[](https://badge.fury.io/py/tic-tac-toe-pygame)
[](https://badge.fury.io/py/tic-tac-toe-pygame)
[](https://github.com/giansimone/tic-tac-toe-pygame/blob/main/LICENSE)
# 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:
```bash
pip install tic-tac-toe-pygame
```
## Usage
To run the game, execute the following command in your terminal:
```bash
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
1. Start the game by running the command above.
2. The game window will open displaying a 3x3 grid.
3. Players take turns clicking on the empty cells to place their marks.
4. 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](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": "https://github.com/giansimone/tic-tac-toe-pygame",
"name": "tic-tac-toe-pygame",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "game, python, board-game, tic-tac-toe, pygame, python3, tic-tac-toe-game, tic-tac-toe-python",
"author": "Giansimone Perrino",
"author_email": "hello@giansimone.dev",
"download_url": "https://files.pythonhosted.org/packages/61/57/41630d2f62d04a7bf2918bc60447ea654fd5ee44c212a496663385dafe70/tic_tac_toe_pygame-0.5.0.tar.gz",
"platform": null,
"description": "[](https://badge.fury.io/py/tic-tac-toe-pygame)\n[](https://badge.fury.io/py/tic-tac-toe-pygame)\n[](https://github.com/giansimone/tic-tac-toe-pygame/blob/main/LICENSE)\n\n# tic-tac-toe-pygame\n\n\n\nA Python implementation of the Tic-Tac-Toe game using Pygame.\n\n## Overview\n\nThis 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.\n\n## Features\n\n- Two-player mode.\n- Simple and intuitive interface.\n- Win detection and draw handling.\n- Pygame graphics.\n\n## Requirements\n\n- Python 3.10 or higher.\n- Pygame library.\n\n## Installation\n\nTo install the required dependencies, run:\n\n```bash\npip install tic-tac-toe-pygame\n```\n\n## Usage\n\nTo run the game, execute the following command in your terminal:\n\n```bash\npython -m tic_tac_toe_pygame\n```\n\n## Game Rules\n\n- The game is played on a 3x3 grid.\n- Players take turns placing their marks (_X_ or _O_) in the empty cells.\n- The first player to align three of their marks horizontally, vertically, or diagonally wins the game.\n- If all cells are filled and no player has three in a row, the game ends in a draw.\n\n## How to Play\n\n1. Start the game by running the command above.\n2. The game window will open displaying a 3x3 grid.\n3. Players take turns clicking on the empty cells to place their marks.\n4. The game will announce the winner or if the game ends in a draw.\n\n## Contributing\n\nContributions are welcome! If you have suggestions for improvements or new features, feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python implementation of the Tic-Tac-Toe game using Pygame.",
"version": "0.5.0",
"project_urls": {
"Homepage": "https://github.com/giansimone/tic-tac-toe-pygame",
"Repository": "https://github.com/giansimone/tic-tac-toe-pygame"
},
"split_keywords": [
"game",
" python",
" board-game",
" tic-tac-toe",
" pygame",
" python3",
" tic-tac-toe-game",
" tic-tac-toe-python"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "acc934a2b6e2229a9e52877a18de7fe81efdd03e9af50028d75d5a06f2e71820",
"md5": "3524fca0e3ff3a56cc881eee99006eb3",
"sha256": "0631243f26fbfbf264b20cfa7e5bbec3bbd12a97126bfe50518254f14956889f"
},
"downloads": -1,
"filename": "tic_tac_toe_pygame-0.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3524fca0e3ff3a56cc881eee99006eb3",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 6830,
"upload_time": "2025-08-18T16:21:23",
"upload_time_iso_8601": "2025-08-18T16:21:23.420801Z",
"url": "https://files.pythonhosted.org/packages/ac/c9/34a2b6e2229a9e52877a18de7fe81efdd03e9af50028d75d5a06f2e71820/tic_tac_toe_pygame-0.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "615741630d2f62d04a7bf2918bc60447ea654fd5ee44c212a496663385dafe70",
"md5": "0a435e359016d597e6b24a7c15976cc2",
"sha256": "b60065fb8dd1029146117bdd4ba869640b755706c10aea78993c2aa26cd5838b"
},
"downloads": -1,
"filename": "tic_tac_toe_pygame-0.5.0.tar.gz",
"has_sig": false,
"md5_digest": "0a435e359016d597e6b24a7c15976cc2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 5232,
"upload_time": "2025-08-18T16:21:24",
"upload_time_iso_8601": "2025-08-18T16:21:24.319855Z",
"url": "https://files.pythonhosted.org/packages/61/57/41630d2f62d04a7bf2918bc60447ea654fd5ee44c212a496663385dafe70/tic_tac_toe_pygame-0.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-18 16:21:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "giansimone",
"github_project": "tic-tac-toe-pygame",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "tic-tac-toe-pygame"
}