Skip to content

MalinaVelkova/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Console Tic-Tac-Toe

A simple, interactive two-player Tic-Tac-Toe game playable in the console. This project is built for learning and practicing Python fundamentals, including input validation, board management, and basic OOP with custom exceptions.

Features

Two-player support Custom player names and signs (X or O) Real-time board rendering in the console Input validation with custom exceptions: Invalid number format Out-of-range selections Occupied position handling Persistent result saving to game_results.txt

Preview

run_game

##File Overview tic_tac_toe.py – Main game logic. game_results.txt – Automatically generated log of past game outcomes.

Code Structure

Setup Phase Collect player names and assign X/O Initialize empty 3x3 board Game Loop Alternates turns between players Validates inputs and board positions Checks for win or draw after each move Post-Game Displays the result Appends result to game_results.txt

About

Simple Tic-Tac-Toe game in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages