The engine of PuzzleStudio