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.2.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.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: text_games-0.2.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ecc11318656e70ec19433469f9f3bcde40b74e6d8b6808794fdeb5f3f1064428
MD5 222ec2143b3ef36e56a3adc562ffce30
BLAKE2b-256 6ef35998f095d13df4a5218402d6fda60975403b5e4a73e6ac3c39977b9ab349

See more details on using hashes here.

File details

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

File metadata

  • Download URL: text_games-0.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b10998fe7ef137763a38a6f2f260f0489602d08dc2b18211cac09d5745727da9
MD5 0ef97e37fb605af3e4c508c793ea79f9
BLAKE2b-256 dc978b5ebaf09d3a9171993dd04bd67e04f0c0ae9659c23a71bf7123d7bec383

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