Implemented a game loop in the play_game method