rewrite check_game logic