A Python implementation of the Tic-Tac-Toe game using Pygame.
Project description
tic-tac-toe-pygame
A Python implementation of the Tic-Tac-Toe game using Pygame.
Overview
This is a simple Tic-Tac-Toe game built with Pygame. The game allows two players to play against each other on a 3x3 grid. Players take turns placing their marks (X or O) in the empty cells of the grid until one player wins or the game ends in a draw. The game checks for winning conditions after each move and displays the result on the screen.
Features
- Two-player mode.
- Simple and intuitive interface.
- Win detection and draw handling.
- Pygame graphics.
Requirements
- Python 3.10 or higher.
- Pygame library.
Installation
To install the required dependencies, run:
pip install tic-tac-toe-pygame
Usage
To run the game, execute the following command in your terminal:
python -m tic_tac_toe_pygame
Game Rules
- The game is played on a 3x3 grid.
- Players take turns placing their marks (X or O) in the empty cells.
- The first player to align three of their marks horizontally, vertically, or diagonally wins the game.
- If all cells are filled and no player has three in a row, the game ends in a draw.
How to Play
- Start the game by running the command above.
- The game window will open displaying a 3x3 grid.
- Players take turns clicking on the empty cells to place their marks.
- The game will announce the winner or if the game ends in a draw.
Contributing
Contributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tic_tac_toe_pygame-0.5.0.tar.gz.
File metadata
- Download URL: tic_tac_toe_pygame-0.5.0.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.5 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b60065fb8dd1029146117bdd4ba869640b755706c10aea78993c2aa26cd5838b
|
|
| MD5 |
0a435e359016d597e6b24a7c15976cc2
|
|
| BLAKE2b-256 |
615741630d2f62d04a7bf2918bc60447ea654fd5ee44c212a496663385dafe70
|
File details
Details for the file tic_tac_toe_pygame-0.5.0-py3-none-any.whl.
File metadata
- Download URL: tic_tac_toe_pygame-0.5.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.13.5 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0631243f26fbfbf264b20cfa7e5bbec3bbd12a97126bfe50518254f14956889f
|
|
| MD5 |
3524fca0e3ff3a56cc881eee99006eb3
|
|
| BLAKE2b-256 |
acc934a2b6e2229a9e52877a18de7fe81efdd03e9af50028d75d5a06f2e71820
|