As a software development student, I wanted to learn more about Rust by creating a fun project. I chose to make a Hangman game since it would teach me different parts of the language while making something interactive.
I wrote a command-line Hangman game that lets players guess words at different difficulty levels. The game includes features like tracking guessed letters, displaying the hangman figure using ASCII art, and handling player input. Players can choose between easy, medium, and hard modes which change both the word length and number of guesses allowed.
I created this project to practice using Rust's features like HashSets, handling user input, and working with strings. It was a great way to learn the basics while making something that actually works and is fun to play.
I used:
- VS Code to write the code
- The Rust programming language
- Cargo (Rust's package manager)
- The rand library for picking random words
- The Rust Programming Language Book
- Rust Standard Library Documentation
- Rust By Example
- Stack Overflow - Rust Questions
- Reddit - r/rust
- Add a way to save high scores
- Add different word categories (like animals or countries)
- Make the hangman drawing look better
- Let players add their own words
- Add a two-player mode