As part of my Computer Science Degree, one of my assignments was to design and build a software product - a game.
This project contains two stages:
- In Stage 1 (this repo), you will need to develop a Command-line User Interface (CUI) version of the product. You will need to use text files to store input and output data from the program.
- In Stage 2, you will upgrade the product to a Graphical User Interface (GUI) version. Meanwhile, you will include a Database component to the product, implement design patterns and include necessary unit tests.
- Must be developed using Java in the NetBeans IDE.
- Be bug-free and feature robust error handling.
- Should be easy to build (no complex build configurations).
Expand Criteria & Requirements
Completed | Requirement |
---|---|
✔️ | User Interface (CUI)
|
✔️ | File IO
|
✔️ | Software functionality and usability
|
✔️ | Software design & implementation
|
If you are not using the NetBeans IDE, you may find that the Sudoku grid does not render the red (locked cells) color correctly. I have included a fix in the Cell.java class.
Show Fix for Other IDEs
@Override
public String toString() {
if (this.isLocked()) {
// Uncomment the following line if you don't use NetBeans:
//return "[" + getUserValue() + "]";
// NetBeans only! Print locked/generated cells in red:
return "[" + COLOUR_RED + getUserValue() + COLOUR_RESET + "]";
}
return ("[" + (isEmpty() ? "_" : getUserValue()) + "]");
}
The Main Menu is the very first step view presented to the player. It allows 4 possible options, to start or continue a game, to show the sudoku rules or to exit the game completely.
Inside the Game Menu, the user is presented with game-related options. To either place or remove a digit, exit the current game with or without saving it's state, or whether the player requires a hint (easy here, they're finite!)
To edit a cell, it must be specified by the user. This Cell Interaction restricts the user to only valid options (aligned with the traditional Sudoku rules).
Sudoku grids may take a while to complete depending on the player's chosen difficulty level, therefore the current game can be saved, and imported next time. Careful though, only one game can be saved at a time!
After the player fills out the Sudoku grid, the challenge is over and a fun-fact is displayed.
While this is not an active project of mine, I would love to hear from you. Feel free to submit a Pull Request if you can improve this repository, or open an issue should you encounter a bug. 🐞