Tobor is an implementation of the game Ricochet Robots.
The goal of the game is to move the target piece (here the green ball) to the target cell on the board (here the cell painted in green) within the smallest amount of steps you can find. You may move the target piece or any other piece too. Pieces move in one of the four directions NORTH, EAST, SOUTH, WEST. However in one step a piece always moves as far as possible until hitting any obstacle. Obstacles on the board are walls on the one hand and other pieces on the other hand. One move in one direction is countet as a step. The steps of all pieces are summed together to obtain the total number of steps needed.
So in the example screenshot above, an optimal solution would be to move the blue piece to the east, followed by the green piece to the south and to the west. This is the only optimal solution here and it needs three steps in total.
Windows:
*--create-project.[ps1|sh|bat]
script at later steps, e.g.:
QT_DIR = C:\Qt
PATH = C:\Qt\6.5.0\msvc2019_64\bin;...
Linux:
Alternatively, you may use the system's package manager:
for Qt5 (e.g. Ubuntu 20.04) run
apt-get install build-essential cmake qtbase5-dev libqt5svg5-dev
for Qt6 (e.g. Ubuntu 22.04) run
apt-get install build-essential cmake libgl1-mesa-dev qt6-base-dev libqt6svg6-dev
MacOS:
Clone this repository.
cd
into directory `script/
Run *-clean-init.[ps1|sh|bat]
to update (in particular initialize) the git submodules
Run *--create-project.[ps1|sh|bat]
to create a project for your custom toolchain
Run *-build.[ps1|sh|bat]
to build your entire CMake Project, including multiple targets
On Windows you may use wos-win-open-sln.ps1
to open your project in Visual Studio
You may use Qt Creator to open a cmake project instead of running *--create-project.[ps1|sh|bat]
scripts and following.
-DUSE_QT6:BOOL=FALSE
for creating projects with cmake instead of just running script *--create-project.[ps1|sh|bat]
. The complete command to create a project using Qt5 is
cmake -S . -B ./build/ -DUSE_QT6:BOOL=FALSE