Skip to content

Tic Tac Toe game based on Python programming language made for final semester project in 1st Semester.

License

Notifications You must be signed in to change notification settings

AbdullahMaqbool22/Tic-Tac-Toe-Game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game

This is a simple command-line implementation of the classic Tic Tac Toe game in Python. The game allows a player to play against the computer and follows the standard rules of Tic Tac Toe.

How to Play

  1. Run the Tic-Tac-Toe.py script to start the game.
  2. And add two files Grid.py & Toss.py as they are further used to import functionality as module's which are used for creating grid and making toss.
  3. The game will prompt the player to enter their name and choose a symbol (either 'X' or 'O').
  4. A toss will decide which player goes first - the player or the computer.
  5. Players will take turns making their moves by entering the number corresponding to the cell they want to place their symbol.
  6. The first player to get three of their symbols in a row (horizontally, vertically, or diagonally) wins the game.
  7. If all cells are filled, and no player has won, the game is declared a draw.

Game Features

  • The game offers a simple and easy-to-use command-line interface.
  • The computer AI tries to make smart moves and counter the player's moves when possible.
  • The game board is displayed after every move to keep track of the game progress.
  • Players can choose their symbol ('X' or 'O').

Requirements

  • Python 3.11.4

How to Run

  1. Clone or download this repository to your local machine.
  2. Open the terminal or command prompt and navigate to the folder containing the downloaded files.
  3. Run the following command to start the game:
    python Tic-Tac-Toe.py
    

Content

  • Tic-Tac-Toe.py (The actual game this file will be runned).
  • Grid.py (Module used to import grid which will be further printed).
  • Toss.py (Module used to import toss making so first move can be decided between (Computer & User)).
  • Note: Add two files Grid.py & Toss.py as they are further used to import functionality as module's which are used for creating grid and making toss.

About the Authors

This Tic Tac Toe game was created by Mohammed Ahsan Wakir (FA22-BCT-001) and Abdullah (FA22-BCT-004) as a project for their computer programming course.

Contributions

We welcome contributions to this project! If you find any bugs, have suggestions for improvements, or want to add new features, please feel free to create issues or submit pull requests.

License

This project is licensed by MIT license.

Contact

For any inquiries or support, please contact Abdullah at abdullahmaqbool08@gmail.com.

Enjoy playing Tic Tac Toe! 🎉🎮


About

Tic Tac Toe game based on Python programming language made for final semester project in 1st Semester.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages