Extract the main game logic into a class Game.cs