Skip to content

Tic-Tac-Toe Game using AI (Player vs Computer) ------ Intermediate Level

License

Notifications You must be signed in to change notification settings

codewithanirban/Tic-Tac-Toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Tic Tac Toe Game

Welcome to Tic Tac Toe, a console-based game implemented in Python! Test your skills against a computer opponent or play with a friend.


Features:

  • Two Modes: Play against the computer or a second player.
  • AI-Driven Gameplay: The computer uses a simple algorithm to make intelligent moves.
  • User-Friendly Interface: Play the game seamlessly with prompts and a clear board display.
  • Replay Option: Restart the game after each match.

How to Play:

  1. Clone this repository:
    git clone <github.com/codewithanirban/Tic-Tac-Toe>
  2. Navigate to the project directory:
    cd TicTacToe
  3. Run the game:
    python tictactoe1.py
  4. Follow the on-screen prompts to make your move.

Highlights:

  • Player Moves: Enter a number (1-9) corresponding to the grid position.
  • Computer Moves: The AI ensures a competitive game experience.
  • Winning Logic: Detects row, column, and diagonal wins.
  • Tie Detection: Recognizes when the board is full without a winner.

Learning Opportunities:

This project demonstrates:

  • Python functions and modular coding.
  • Conditional statements and loops.
  • Basic AI for decision-making in games.

Contribution:

Feel free to improve the AI logic, enhance the UI, or add new features. Pull requests are welcome!


License:

This project is licensed under the MIT License.

About

Tic-Tac-Toe Game using AI (Player vs Computer) ------ Intermediate Level

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages