blindly wrote a lot of game logic