Welcome to the Hangman Game in C++! This is a classic word-guessing game designed to be played right in your terminal window.
-
Compile the Game:
- Make sure you have a C++ compiler installed on your system.
- Open your terminal and navigate to the project directory.
- Compile the game using the following command:
g++ hangman.cpp -o hangman
-
Run the Game:
- Start the Hangman game by running the compiled executable:
./hangman
- Start the Hangman game by running the compiled executable:
-
Game Rules:
- You will be presented with a series of underscores representing a hidden word.
- Guess letters one at a time by entering them in the terminal.
- You have a limited number of incorrect guesses (usually 6) before the game is over.
- If you guess a letter correctly, it will be revealed in the word.
- Continue guessing until you guess the entire word or run out of guesses.
-
Winning and Losing:
- If you guess the word correctly within the allowed number of tries, you win!
- If you run out of guesses before revealing the word, you lose.
You can customize the game by modifying the word list in the source code (WordGenerator.cpp) or using a build in feature. Feel free to add your own words or themes to make the game more interesting.
- C++ compiler (e.g., g++)
- Terminal or command prompt
This Hangman game is designed to run on various operating systems, including Windows, macOS, and Linux.
If you'd like to contribute to this project, feel free to submit pull requests or open issues. Your contributions and feedback are greatly appreciated!
This project is open source.
Have fun playing Hangman in your terminal! If you encounter any issues or have suggestions for improvement, please let us know.