Skip to content
/ hangman Public template
generated from BrianLusina/game-of-life

Simple Text Based User Interface game of Hangman built with Python

License

Notifications You must be signed in to change notification settings

BrianLusina/hangman

Repository files navigation

Hangman

Build Lint Tests

This is a command line game application inspired by Hangman which is a word skill game that teaches basic language skills. This game is between the computer and one human player. The computer will act as the selecting plater and will select the word to guess, process human input and handle all output. The human player is the guessing player, simply referred to as the player. When the player knows the word, they continue to guess correct letters until the word is complete.

You can change the words the game will select in the words.txt file with a different choice of words.

Pre-requisites

  1. Ensure that you have Python version 3.12.0 setup locally, you can set this up using pyenv if you have multiple versions of Python on your local development environment.
  2. Poetry is used for managing dependencies, ensure you have that setup locally.
  3. Virtualenv Not a hard requirement as poetry should setup a virtual environment for you, but can be used as well to setup a virtual environment.

Setup

  1. After cloning the project, install the dependencies required with:

    poetry install

    When using poetry

    Or

    make install

    When using GNU Make, this is a wrapper around the top commend

  2. Install hangman in editable mode:

    cd hangman
    pip install -e .

Execution

To execute hangman, go ahead and run the below command:

python hangman

Which will run the game. Enjoy!