A web-based implementation of the classic Klotski sliding block puzzle game. The game challenges players to move a special block to a specific position by strategically sliding other blocks out of the way, aiming to complete the puzzle in the minimum number of moves possible.
- User authentication system for game progress tracking
- Multiple difficulty levels (Simple, Medium, Hard, Impossible)
- Move counter to track puzzle solving progress
- Game controls:
- Reset button to restart the current puzzle
- Undo button for reverting the last move
- Hint system for assistance when stuck
- History tracking of last 10 games with move counts and timestamps
- Ability to start a new game at any time
- Java 17
- Spring Boot 3.0.2
- Gson 2.10.1
- Lombok 1.18.28
- JUnit
- Gradle 7.6
- TypeScript 5.0.4
- Vue 3.2.47
- Tailwind CSS 3.3.2
- Axios 1.3.6
- Vuex 4.1.0
- Vite 4.3.2
- Node.js 18.16.1
The project follows a clear separation between frontend and backend, implementing the following design patterns:
- Model-Controller (MC) architecture with API exposure
- Visitor pattern for tile behavior management
- Repository pattern for data persistence
- Strategy pattern for movement validation and JSON serialization
- Docker
- Amazon Corretto 17 (Amazon's distribution of OpenJDK 17)
- WSL2 (required for Windows users)
- IntelliJ IDEA (recommended IDE)
- Clone the repository from GitHub
- Open the project in IntelliJ IDEA
- Navigate to the
docker-compose.ymlfile - Start the frontend and database services by clicking the green play button on lines 4 and 18 respectively
- Open the Gradle tool window in IntelliJ IDEA
- Navigate to:
klotski-web/klotski-web/game-rest-api/Tasks/application - Double-click on the
bootRunexecutable
- Click on "Services" at the bottom left of IntelliJ IDEA
- Select
klotski-web-frontend-1 - The application URL will be displayed
The project is structured with a clear separation between frontend and backend components, allowing for potential frontend reimplementation (e.g., with JavaFX) while maintaining the same backend structure.