deport code from game window to Game class