Sokoban is a console-based game where the player moves around a grid, trying to get all the seeds into the storages.
- 100 Unique levels
- Ability to add more levels
- Ability to solo playing
- Self solving using various algorithms (DFS, BFS, UCS, A*, HillClimbing)
- Ability to cancel algorithms execution using CancellationToken
Sokoban is a simple yet challenging puzzle game where you help a character move boxes around to the right spots. The word "Sokoban" in Japanese means "warehouse keeper," which fits perfectly with the concept of organizing boxes in a small space.
-
Goal:
- The goal is to move all the boxes onto their marked spots, or targets, to complete the level.
-
Rules:
- You are allowed to push boxes but never pull them.
- You can only push one box at a time.
- You are not allowed to move through walls or push boxes into corners where they may get stuck.
It's not all about moving things around-you have to think!
Every move is crucial because if you push the box in the wrong direction, then you might block your way to the end of the level. How each puzzle is solved is by planning ahead.
It consists of a grid with some walls, several boxes, and marked target spots. Movement consists of pushing the boxes onto the target spots by moving your character up, down, left, or right.
'@' Player
'+' Player on storage
'$' Box
'*' Box on storage
'.' Storage
'#' Wall
- Arrow Keys: Movement
- N: Next level
- B: Previous level
- U: UnDo
- 1: Apply DFS algorithm
- 2: Apply BFS algorithm
- 3: Apply UCS algorithm
- 4: Apply A* algorithm
- 5: Apply Hill-Climbing algorithm
- C: Cancel algorithm execution
- P: Show steps from the begging to the current state (Solve Path) step by step at the speed of 1 step every second
- L: Increase the speed of showing path
- K: Decrease the speed of showing path
- C: Cancel algorithm execution
- Q: Quit the game
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them
- .NET 8 or higher
A step by step series of examples that tell you how to get a development environment running
- Clone the repository
- Navigate to the project directory
- Run
cd src
- Run
dotnet build
to build the project - Run
dotnet run
to start the game
If you like it give it a star ✨✨