Code the GameEngine