Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Three in a Row

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. image image

Run

  1. Install Python 3.8 or newer.

  2. 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 8080

To start the server without opening a browser automatically:

python tictactoe.py --no-browser

Play

Players 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.

Project files

  • tictactoe.py starts a local HTTP server for the game files.
  • index.html contains the accessible game layout.
  • style.css defines the responsive visual design.
  • script.js handles turns, win and draw detection, and session scores.

About

A lightweight, zero-dependency Tic-Tac-Toe game written in Python that runs right in your browser using only the standard library.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages