Skip to content

this is the tic-tac-toe game as we know it, implemented in Python & Pygame.

License

Notifications You must be signed in to change notification settings

bymayanksingh/tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Issues Forks Stars Maintained Made with Python Open Source Love Built with Love Follow Me Telegram

📒 Index

🔰 About

Implemented in Python & Pygame. It consists of noughts and crosses or Xs and Os and is a paper-and-pencil game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.

⚡ Usage

To use this project.

🔌 Installation

  • Install dependencies & export environment variables.
$ sudo -H pip3 install -r requirements.txt

📦 Commands

  • Start project using
$ python3 game.py

📁 File Structure

  • Add a file structure here with the basic details about files, below is an example.
.
├── assets.py
├── config.py
├── game.py
├── images
│   ├── CROSS.png
│   ├── logo
│   │   └── tictactoe.png
│   ├── NOUGHT.png
│   └── screenshots
├── LICENSE
├── README.md
└── requirements.txt

3 directories, 9 files
No File Name Details
1 assets.py used for loading image files in python.
2 config.py contains game's configuration settings.
3 game.py contains tic tac toe game's logic.
4 images/ contains image resources used in the game.
5 images/logo contains logo used in the README.
6 images/screenshots contains game screenshots.
7 LICENSE this project uses MIT License.
8 requirements.txt contains all the dependencies used in the game.

❗ Guideline

  • Code Style

black

In order to maintain the code style consistency across entire project I use a code formatter. I kindly suggest you to do the same whenever you push commits to this project.

The python code formatter I chose is called Black. It is a great tool and it can be installed quickly by running

sudo -H pip3 install black

or

python3.6 -m pip install black

It requires Python 3.6.0+ to run.

  • Usage
black {source_file_or_directory}

For more details and available options, please check their psf/black.

isort

I also use isort, it is a Python utility / library to sort imports alphabetically, and automatically separated into sections. It provides a command line utility which can be installed using.

sudo -H pip3 install isort 
  • Usage
isort {source_file}.py

For more details and available options, please check their timothycrosley/isort.

  • Close Issues

Close issues using keywords: how to ?

📄 Resources

  • PyGame Documentation : Pygame is a cross-platform set of Python modules designed for writing video games. It includes computer graphics and sound libraries designed to be used with the Python programming language.

📷 Gallery

🌟 Credit/Acknowledgment

Contributors

🔒 License

License

About

this is the tic-tac-toe game as we know it, implemented in Python & Pygame.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages