Implements (untested) game logic