An open API service indexing awesome lists of open source software.

https://github.com/samyam81/guessnum

Guess the number.
https://github.com/samyam81/guessnum

class cli gui java

Last synced: over 1 year ago
JSON representation

Guess the number.

Awesome Lists containing this project

README

          

# Guess-The-Num

This repository contains two implementations of a "Guess-The-Num" game: one in console mode and the other in GUI mode using Java Swing.

## Console Version (`guess` Class)
- The `guess` class implements the console version of the game.
- It generates a random number between 0 and 9 and prompts the user to guess the number.
- The user has three lives to guess the correct number.
- After each guess, the program provides hints to help the user guess the number.
- Once the user runs out of lives, the game reveals the correct answer.

## GUI Version (`guessnum` Class)
- The `guessnum` class implements the GUI version of the game using Java Swing.
- It provides a graphical interface for the user to input their guesses.
- The interface displays the number of lives remaining and provides feedback on each guess.
- The game continues until the user either guesses the correct number or runs out of lives.
- Once the game ends, the GUI displays the correct answer.

### How to Play
- Run the `guess` class for the console version or the `guessnum` class for the GUI version.
- Follow the prompts to input your guesses.
- In the GUI version, click the number buttons to input your guess.
- Pay attention to the feedback provided after each guess.
- Try to guess the correct number within the given number of lives.

Enjoy playing "Guess-The-Num" in both console and GUI modes!