A two-player Tic-Tac-Toe game with a browser-based interface, launched from Python. The game runs locally and uses only Python's standard library; no package installation is needed.

-
Install Python 3.8 or newer.
-
From this folder, run:
python tictactoe.py
The local game opens in your browser at http://127.0.0.1:8000. Keep the terminal open while playing; press Ctrl+C there to stop the server.
To choose another address or port:
python tictactoe.py --host 127.0.0.1 --port 8080To start the server without opening a browser automatically:
python tictactoe.py --no-browserPlayers take turns placing X and O. The first player to make a line of three wins the round. A full board with no winning line is a draw. Choose New game to start another round; the session score is kept until the page is refreshed.
tictactoe.pystarts a local HTTP server for the game files.index.htmlcontains the accessible game layout.style.cssdefines the responsive visual design.script.jshandles turns, win and draw detection, and session scores.