Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Tic-Tac-Toe Game #1042

A compact Python terminal game (<100 lines) where you play Tic-Tac-Toe against a computer opponent that makes random valid moves.


Features

  • Classic 3×3 Tic-Tac-Toe gameplay
  • Play as X, computer plays as O
  • Computer makes random valid moves
  • Detects win, draw, and invalid input
  • Runs entirely in the terminal, no extra libraries required

Installation

  1. Clone this repository
    git clone https://github.com/<your-username>/100LinesOfPythonCode.git
    cd "#1001_tictactoe_vs_ai"
    
  2. Run the python file
  • python ./tictactoe_vs_ai.py