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 run_hangman run_hangman()

Number Gusser from text_games.number_guesser import run_number_guesser run_number_guesser()

Rock Paper Scissor from text_games.rock_paper_scissor import run_rock_paper_scissors run_rock_paper_scissors()

Riddle game from text_games.riddle_game import run_riddle_game run_riddle_game()

Word Scrambler from text_games.word_scrambler import run_word_scrambler run_word_scrambler()

Snake Game from text_games.snake_game import run_snake_game run_snake_game()

Tic Tac Toe from text_games.tic_tac_toe import run_tic_tac_toe run_tic_tac_toe()

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: text_games-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 c17e856b9c7e52f7bbf76f9105f9d378cfb721e722574fa3a614fe7b745452be
MD5 fc5b55fa1372cf6b58a5b54241abe529
BLAKE2b-256 7bcc51c1887692c8717587118db3d1a1ef211104b270e1e61d47ac03b4426926

See more details on using hashes here.

File details

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

File metadata

  • Download URL: text_games-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1a8db0927adb581ff93061800690cb1893e35ae02564058eed4df2e5972bdd3c
MD5 7bfab6ce440aaf0b558bf140c9921246
BLAKE2b-256 6f4989c8c6d381564cd0f489915e3335cb81b41328c0601cb95c13f6758520ed

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