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.1.tar.gz (6.8 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.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

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

Hashes for text_games-0.2.1.tar.gz
Algorithm Hash digest
SHA256 49b008ab1cd0bc1c3829aa4876422d620e39a5e7d63a50062172979d0ee5f7f1
MD5 19385a1ce2de7d445d5a9a2f04db2ae8
BLAKE2b-256 232904365beac90c09a59eeb3543e04483ead7b525c584a1b87605c290e443d1

See more details on using hashes here.

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

Hashes for text_games-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98f97b8475cf5c215772c380e708ebe0d9bb0ae4c12ab58f2eb4323cc85aee04
MD5 e0ed48a37cdc8b2439b9fb03e69392f4
BLAKE2b-256 59025a18b93326774c2e25527cf507eca190bd52765a8652e8f999a5d2a901f5

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