Skip to content

laarnibonifacio/hangman569

Repository files navigation

Hangman

Hangman is a classic game in which a player thinks of a word and the other player tries to guess that word within a certain number of attempts.

Table of Contents

  • Project Description

  • Installation Instructions

  • Usage Instructions

  • File Structure

  • License Information

Project Description

This is a simple implementation of the classic Hangman game. The game randomly selects a word from a predefined list and the player has to guess the word by suggesting letters. The game keeps track of the number of lives the player has and the number of letters left to guess.

The aim of this project is to practice object-oriented programming and game development in Python. I learned how to create a class to represent the game, handle user input, and implement game logic.

Installation Instructions

To run the game, you need to have Python installed on your computer. You can download the latest version of Python from the official Python website.

Once you have Python installed, you can clone this repository using the following command:

git clone https://github.com/laarnibonifacio/hangman569.git

Then, navigate to the project directory and run the game using the following command:

python hangman.py

Usage Instructions

  1. To play the game, simply run the ‘hangman.py’ file and follow the prompts.
  2. The game will ask you to guess a letter, and you can enter a single alphabetical character.
  3. If the letter is in the word, the game will prompt if you guess the correct letter.
  4. If the letter is not in the word, the game will reduce the number of lives you have.
  5. Most importantly, have fun playing. 🙃

File Structure

The project consists of the following files:

  • hangman.py : The main game file that contains the game logic and user interface.
  • hangman_Template.py : A template file that contains the basic structure of the game.
  • milestone_3.py : A file that contains the ask_for_input function used in the game.
  • milestone_5.py : A file that combines milestone_4.py which verifies if the letter is correct and codes the logic of the game.

License Information

This project is licensed under the MIT License. You are free to use, modify, and distribute the code as long as you include the original copyright notice and license terms.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages