REST game logic and tests