Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oskarowski/sudoku-desktop-game
A Java-based Sudoku game with an MVC architecture and a JavaFX GUI. Features persistent storage using SQLite or local files.
https://github.com/oskarowski/sudoku-desktop-game
component-programming fxml javafx-application jooq maven mvc-architecture sqlite-jdbc
Last synced: about 1 month ago
JSON representation
A Java-based Sudoku game with an MVC architecture and a JavaFX GUI. Features persistent storage using SQLite or local files.
- Host: GitHub
- URL: https://github.com/oskarowski/sudoku-desktop-game
- Owner: Oskarowski
- License: epl-2.0
- Created: 2024-06-20T19:11:02.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2024-06-23T10:48:50.000Z (6 months ago)
- Last Synced: 2024-10-13T18:22:27.787Z (2 months ago)
- Topics: component-programming, fxml, javafx-application, jooq, maven, mvc-architecture, sqlite-jdbc
- Language: Java
- Homepage:
- Size: 491 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sudoku Java Desktop Application
## Table of Contents
- [Sudoku Java Desktop Application](#sudoku-java-desktop-application)
- [Table of Contents](#table-of-contents)
- [About the Project](#about-the-project)
- [In-Game Screenshots](#in-game-screenshots)
- [Main Menu](#main-menu)
- [Gameplay](#gameplay)
- [Save Game](#save-game)
- [Dependencies](#dependencies)
- [Installation](#installation)
- [How to Play](#how-to-play)
- [Features](#features)
- [Internationalization](#internationalization)
- [Database Schema](#database-schema)
- [Testing](#testing)## About the Project
Multi-Module Maven project (MVC) of Sudoku Game with JavaFX GUI. The app provides the ability to choose different levels of difficulty, change the language, save to file, save to DB, and load the data from the file or from the DB. The game can be saved whenever a user wants to do it and save current progress to a file or DB and again load data to continue the started game in next session.
## In-Game Screenshots
### Main Menu
Main Menu ENG
Main Menu PL
### Gameplay
Gameplay ENG
Gameplay PL
### Save Game
Save Game DB
Save Game Filesystem
## Dependencies
This project requires the following dependencies:
- Java >21: Minimum version required for running the application.
- JDK >21: Minimum version required for running the application.
- JavaFX >22: for building the graphical user interface.
- Maven >3.9: for project management and building.
- JOOQ: for database interactions.
- SQLite: as the database to store Sudoku boards.
- SLF4J and Logback: for logging purposes.## Installation
To set up and run this project locally, follow these steps:
1. **Clone the repository**:
```sh
git clone https://github.com/Oskarowski/sudoku-desktop-game.git
cd sudoku-desktop-game
```2. **Build the project**:
```sh
mvn install
```3. **Run the application**:
```sh
mvn javafx:run -pl View
```## How to Play
1. **Start the Game**:
- Launch the application, choose difficulty and click on "New Game". Or load previous game from DB or filesystem.
2. **Save Game**:
- Click on the "Save Game" button to save your current Sudoku board to a file.
- You can also save your game to a database by clicking the "Save to DB" button.3. **Load Game**:
- To load a game from a file, click on the "Load Game" button.
- To load a game from the database, first select the desired saved game from the list and next click on the "Load from DB" button and .4. **Solve Sudoku**:
- Fill in the cells with numbers from 1 to 9. Each number can appear only once per row, column, and 3x3 grid.## Features
- **Save and Load Game**: Save your game progress to a file or database and load it anytime.
- **Database Integration**: Store and retrieve Sudoku boards from DB (SQLite).
- **System Filebase Integration**: Store and retrieve Sudoku boards using the system's filesystem (object serialization).
- **Internationalization**: Supports multiple languages.
- **User-friendly Interface**: Intuitive and easy-to-use GUI built with JavaFX.
- **Difficulty Levels**: Choose from 3 different levels of difficulty.
- **Logging**: Comprehensive logging for debugging.## Internationalization
This application supports currently English and Polish languages. The localization is handled using `ResourceBundle` to load the appropriate language properties files based on the user's locale.
## Database Schema
The Sudoku game uses a **SQLite** database to store game boards and fields.
For an ER diagram illustrating the database schema, please refer to [ER Diagram](JdbcDao/src/main/java/sudoku/jdbcdao/database/database-schema.md).
## Testing
This project uses **JUnit Jupiter** for unit tests and **JaCoCo** for code coverage analysis.
To execute the tests, run:```sh
mvn test
```