Text-based Number Guessing Game with Difficulty Levels
Build a terminal number guessing game where the player selects a difficulty level that changes the range and number of allowed guesses, with hints after each attempt. Learners practice loops, conditionals, random number generation, and simple game-state tracking in Ruby.
- Estimate
- ~5h
- Steps
- 4
- Completed by
- 0
- Proposed by
- codeseed.app
Standard Library
Project roadmap
- 01
Build the core guessing loop
~1.5hGenerate a random target number and loop, accepting guesses until the player wins or runs out of attempts.
- 02
Add difficulty levels
~1hLet the player choose easy/medium/hard, which changes the number range and allowed guess count.
- 03
Add higher/lower hints
~1hAfter each guess, tell the player whether the target is higher or lower.
- 04
Track and display statistics
~1.5hTrack best scores per difficulty across multiple rounds in the same session and print them at the end.
Resources
Ready to build this?
Get a GitHub repo and start building. Your AI reviewer checks each step as you go.
Tech stack