Welcome to the Hangman Game, a fun and interactive console-based game written in C++. This game offers several modes including Singleplayer, Two Player, and an Interactive Two Player mode where one player provides a word and a hint, and the other guesses it. Additionally, the game features a word list management system for adding and viewing words.
Play against the computer with words randomly selected from the included list.
Two players can play against each other, taking turns to guess words.
A unique mode where one player inputs a word and a hint, and the other player attempts to guess the word.
Add new words to the game's word list or view existing words.
Ensure you have the following installed:
- CMake (minimum required version 3.10)
- A C++ compiler supporting at least C++11 standard
To build the game, follow these steps:
- Clone the repository:
git clone https://github.com/milanfusco/Hangman.git
- Navigate to the project directory:
cd Hangman
- Create a build directory:
mkdir build && cd build
- Run CMake:
cmake ..
- Build the project:
make
This will compile the game and generate an executable named 'HangmanGame' in the 'build' directory.
To run the game, navigate to the 'build' directory and execute:
./HangmanGame
When you start the game, you'll be greeted with the main menu, where you can select from the following options:
- Play Singleplayer
- Play Two Player
- Play Interactive Two Player
- Manage Word List
-
- View Existing Words
-
- Add Words
-
- Return to the Main Menu
Choose an option by entering the corresponding number.
For Singleplayer, Two Player, and Interactive Two Player, you will be prompted to select a difficulty level.
- Noob - 8 Guesses
- Intermediate - 4 Guesses
- Veteran - 2 Guesses
To add new words, select the "Manage Word List" option from the menu, then choose to add a new word. Follow the prompts to enter the word and optionally, a hint.
Contributions are welcome! If you have suggestions for improvements or new features, feel free to create an issue or a pull request.
Have Fun!