fixed the game to fewer lines of code