implement the game