final code for game_if