Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 811 Bytes

File metadata and controls

30 lines (21 loc) · 811 Bytes

Tic-Tac-Toe (Python)

Simple Tic-Tac-Toe game developed as the final assignment of the Python Essentials course.

The game runs in the terminal and simulates a match between the user and the computer.

Rules

  • The computer plays with X
  • The user plays with O
  • The computer always starts and takes the center position
  • The user chooses positions using numbers from 1 to 9

Game Logic

  • The computer uses a basic strategy:
    • Takes a winning move if available
    • Blocks the player from winning
    • Otherwise plays randomly
  • The game ends when:
    • One player wins
    • There is a draw (no more available moves)

How to Play

  1. Run the script:
    python tic_tac_toe.py
    

This project was part of the Python Essentials course and I obtained my first Python certification.