Skip to content
Hattevijayalaxmi

Hattevijayalaxmi/GuessNumber

Live in production

A fun and interactive Number Guessing Game developed using Core Java and Java Swing GUI.

0 0JavaPush 24d agoListed 10d agoNo license on GitHub

No GitHub topics on this repo.

  • Java100.0%
View on GitHub

Report a problem

1 Review

GuessNumber is a nice beginner-friendly Java Swing project with more polish than a bare console guessing game. The maintainer has added a real menu, multiple difficulty levels, custom range support, instructions, an about dialog, replay behavior, and input handling, which makes it feel like a complete small desktop app rather than just an exercise. I also liked that the in-app changelog shows the project evolved through several feature passes; that gives a reader a sense of learning and iteration.

The biggest improvement would be making the repository easier to run from GitHub. The README says the source lives under src/GuessNumber.java, but the actual file is at the repo root and declares package guessnumber;, so a new user may not know the right folder structure or compile command. Adding exact steps such as mkdir guessnumber, placing the file there, and running javac guessnumber/GuessNumber.java && java guessnumber.GuessNumber would help a lot. A small cleanup pass would also make the code easier to maintain: Java conventions usually use lowerCamelCase for fields like diffFrame, secret, and guess, and the current actionPerformed method could be simplified with else if blocks or helper methods for each button action. The cancel handling should compare strings with .equals(...) rather than ==, or better, check whether the input dialog returned null before parsing. I’d also suggest validating custom difficulty so negative or non-useful ranges do not silently remain unchanged.

The README is a good start because it lists features and includes a screenshot, but it would be stronger with a short “How to run” section, a matching project structure, a license, and maybe a sentence about what version of Java was used. Overall, this is a solid learning project with a clear playable result; tightening the packaging, documentation, and a few Swing/input edge cases would make it much easier for other developers to try and build on.