Implement play_game function