This game is also known as Tablut, a Viking board game whose rules were recorded in Lapland. It is asymmetric and very quick to play. The game is written in C++ and uses the Simple and Fast Multimedia Library.
It is played on a 9x9 board:

The attackers move first.
The attackers win if they surround the king horizontally and vertically, either with four of their units, with one on each side:
or with three of them if the King is against the edge of the board:
The defenders win if their king manages to get to one of the four corners of the board.
All pieces move as far as they want in either the horizontal or vertical direction, as long as the path is clear and the destination square is unoccupied.
To capture a piece, you must flank it on two opposite sides, either horizontally or vertically. For example:
Before Capture:
The attacker can capture by moving his left piece up one square.
After Capture:
The King can assist with captures if paired with another defender. The King cannot be captured in this way.
If an attacker or defender piece is in one of the four corners, you can capture it by placing one of your pieces on both the two adjacent squares (one horizontal and one vertical). This is an exception to the normal capture rules. Here is an example.
Before corner capture:
After corner capture:
Captures happen only at the end of a movement (meaning you can safely move between two enemies that are already in a flanking position; they can only capture you in that situation if they move away and come back).
Select the piece you want with the left mouse button. If you change your mind you can either right click anywhere or left click the piece to deselect it. Then click where you want to move.
This was written and tested on Ubuntu Linux and Linux Mint. It should also work on Windows.
You'll need to make sure the relevant dependencies are met. Once you have run the two cmake commands mentioned below, you can go to ./build and run make from there. The executable will be at ./build/bin/KingsTable.
-
If you use Linux, install SFML's dependencies using your system package manager. On Ubuntu and other Debian-based distributions you can use the following commands:
sudo apt update sudo apt install \ libxrandr-dev \ libxcursor-dev \ libudev-dev \ libfreetype-dev \ libopenal-dev \ libflac-dev \ libvorbis-dev \ libgl1-mesa-dev \ libegl1-mesa-dev
Be sure to run these commands in the root directory of the project you just created.
cmake -B build cmake --build build
The game will then be available from
./build/bin/KingsTable
.Thanks to the template at https://github.com/SFML/cmake-sfml-project this was fairly easy to get started with. I recommend using this template if you are new to SFML or cmake.