The Hangman game is a classic word-guessing game implemented in C. This console-based version challenges players to guess a hidden word by suggesting letters within a limited number of incorrect guesses. The game features a visual representation of the hangman that progresses with each incorrect guess, adding a fun and interactive element to the gameplay.
This game was created to practice making an array, loop operations and if statements.
When the player starts the game, a random word is chosen from a predefined list of array called ‘words’ using rand().
The player can see the word, with each letter hidden as an underscore.
The player guesses letters, and if the letter that the player entered exists in the word, it is revealed in the correct position.
If the player guesses wrong, the visual representation of a stick figure on a gallows (the “hangman”) progress.
The game ends when the player either guesses the word correctly or reaches 6 wrong guesses.
Developing the Hangman game sharpened my skills in C programming, especially in handling strings and implementing basic syntax. I gained practical experience in game mechanics, including user input, random word selection, and managing game state. The project improved my understanding of randomization and game logic, as well as my ability to create visual feedback using ASCII art. I also enhanced my debugging skills through troubleshooting and iterative development.