Making the game functional