code for the game