We created a very simplistic API for implementing chess-like games by introducing the newGame() and move() virtual methods to the algorithm class. The former method simply sets up everything. The latter uses simple checks to determine whether a particular move is valid and whether the game has ended. We use the m_fox member variable to track the current position of the fox to be able to quickly determine whether it has any valid moves. When the game ends, the gameOver() signal is emitted and the result of the game can be obtained from the algorithm. You can use the exact same framework for implementing all chess rules.