Skip to main content

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:

  1. Hangman: Guess the hidden word letter by letter.
  2. Number Guesser: Guess a random number within a certain range.
  3. Rock-Paper-Scissors: Play against the computer.
  4. Riddle Game: Solve riddles within a limited number of attempts.
  5. Word Scramble: Unscramble the shuffled letters to form a word.
  6. Snake Game: A simple terminal-based version of the classic Snake game.
  7. 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

text_games-0.2.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

text_games-0.2.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file text_games-0.2.0.tar.gz.

File metadata

  • Download URL: text_games-0.2.0.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for text_games-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ae3db82a99b76dffa54e1fb3dd9bf9c42f9e89c5e041ed175dd7c4a0f7c3895f
MD5 f46fc3a01b9d353b867cac8693ffd0a1
BLAKE2b-256 e22d3a13dc63a9aa70c706e848117c0f8b3bb542098210e1fdbcb92201cdebf8

See more details on using hashes here.

File details

Details for the file text_games-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: text_games-0.2.0-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

Hashes for text_games-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6272720663dae7a44675c25cd7d192c353a27e782008aba9c00aef8c45f5f4c
MD5 7ffad5c557b04ca539abb7a3c407f4c7
BLAKE2b-256 1da94703f8847f3812f961afae4b14d301669162c0b8e1dc17cdca41e22c78ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page