Fixed and possibly finished game logic.