Skip to content

A Simple TicTacToe game that has its own intelligence. Made with Python and Pygame from scratch with minimum external dependence.

License

Notifications You must be signed in to change notification settings

promitbasak/TicTacToe-Pygame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToe-Pygame

A Simple TicTacToe game that has its own intelligence. Made with Python and Pygame from scratch with minimum external dependence.

Features:

  • 4 different levels: Easy Medium, Hard, Deadly.
  • In deadly mode,you cannot beat the computer.
  • Randomized moves.
  • Can be played with both keyboard and mouse.
  • A mobile and a CLI version are also available.

How to play:

Windows:

Play from Source

At first you need to do this:

  • Youn need python version 3.6+.
  • You need to have pygame module installed on python. If you don't, just open the terminal and run the command pip install pygame.
  • Download the entire repository as zip and extract it anywhere. Optionally you can Download all the files excluding venv.zip.
  • If you download venv.zip, Extract it in the same folder.

PC:

  • Run the tictactoe_pygame with IDLE or any python IDE.

CLI:

  • Run the ttt.py with IDLE or any python IDE.

Android:

  • Download Pydroid 3 from Play store.
  • Open the tictactoe_mobile_1080p.py with Pydroid 3.
  • It has a bug. Refer to the Bug section.
  • Only works on FHD resolution phone.

Keyboard Controls

  • You can play this game using mouse or Keyboard. You can play with any of them simulteneously.
  • Press any key where the game says "Click Anywhere".
  • Use Number keys (1,2,3,4 etc) to choose the marker or difficulty.
  • Enter any number between 1 to 9 to give your turn. The board behaves like a (3 * 3) grid.

Drawbacks

  • Not a great Graphics.
  • Not greatly optimized as I have written almost everything from scratch.
  • Mobile version Code runs on FHD resolution phone only.

Bugs

  • In mobile version, the board takes 5-6 seconds to initialize after selecting the difficulty.

(c) This game is licensed under MIT License

About

A Simple TicTacToe game that has its own intelligence. Made with Python and Pygame from scratch with minimum external dependence.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages