A collection of text-based games in Python.
Project description
Text Games
text_games is a Python module that offers a collection of simple, text-based games for fun and learning.
Features
The module includes the following games:
- Hangman: Guess the hidden word letter by letter.
- Number Guesser: Guess a random number within a certain range.
- Rock-Paper-Scissors: Play against the computer.
- Riddle Game: Solve riddles within a limited number of attempts.
- Word Scramble: Unscramble the shuffled letters to form a word.
- Snake Game: A simple terminal-based version of the classic Snake game.
- Tic-Tac-Toe: Play Tic-Tac-Toe (Noughts and Crosses) against the computer or another player.
Installation
You can install the module via pip:
pip install text-games
Usage
Each game is implemented in its own file within the text_games folder. You can import and use them individually as needed. Here's how you can play each game:
Hangman
from text_games.hangman import play_hangman
play_hangman()
Number Gusser
from text_games.number_guesser import play_number_guesser
play_number_guesser()
Similarly import the necessary game and use as the above structured code to use the game.
Project details
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 text_games-0.2.1.tar.gz.
File metadata
- Download URL: text_games-0.2.1.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49b008ab1cd0bc1c3829aa4876422d620e39a5e7d63a50062172979d0ee5f7f1
|
|
| MD5 |
19385a1ce2de7d445d5a9a2f04db2ae8
|
|
| BLAKE2b-256 |
232904365beac90c09a59eeb3543e04483ead7b525c584a1b87605c290e443d1
|
File details
Details for the file text_games-0.2.1-py3-none-any.whl.
File metadata
- Download URL: text_games-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98f97b8475cf5c215772c380e708ebe0d9bb0ae4c12ab58f2eb4323cc85aee04
|
|
| MD5 |
e0ed48a37cdc8b2439b9fb03e69392f4
|
|
| BLAKE2b-256 |
59025a18b93326774c2e25527cf507eca190bd52765a8652e8f999a5d2a901f5
|