Skip to content

git-adithyanair/Hangman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hangman

Hangman game implemented using Python and Turtle Graphics!

Getting Started

Download the files above and follow the steps below.

Installing

Open the terminal, navigate to where you want the game's files to be stored in and create a new directory:

mkdir DIRECTORY_NAME

Enter the new directory:

cd DIRECTORY_NAME

Create and activate a new virtual environment:

python3 -m venv myenv
source myenv/bin/activate

Copy the downloaded files into the virtual environment created and enter the virtual environment:

cd myenv

Run the following line to install all dependencies for the game:

pip3 install -r requirements.txt

Usage

Start the game by running this line in the terminal:

python hangman.py words.txt

A turtle graphics screen will popup which is empty initially but will draw out the hangman as incorrect guesses are attempted. Enter in a letter in the terminal to make guesses.

The game is won when the word is guessed completely, or lost when the entire hangman has appeared. To end the game, type 'end' into the terminal. Good luck!

Note

If attempting to make a guess results in a NameError exception, ensure all letters (as well as 'end' to stop the game) are placed within single quotes.

Releases

No releases published

Packages

No packages published

Languages