fix finish bug
This commit is contained in:
parent
792b8905c2
commit
1702bdc73b
|
@ -322,6 +322,11 @@ def game_loop():
|
|||
except NoLevelFoundError as err:
|
||||
print("Error encountered: {}".format(err))
|
||||
elif command in ("f", "finish", "(f)inish"):
|
||||
if (not game.game_in_progress and not game.game_finished):
|
||||
print("Can't finish game, game was not started yet.")
|
||||
elif (not game.game_in_progress and game.game_finished):
|
||||
print("Can't finish game, game was already finished earlier.")
|
||||
else:
|
||||
if check_flag(game.level, flag_checker):
|
||||
finish_game(game)
|
||||
elif command in ("i", "info", "information", "(i)nfo", "(i)nformation"):
|
||||
|
|
Reference in New Issue