Skip to content

daleteferreirac/Tic-Tac-Toe-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

Python essentials cisco project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages