mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-26 20:54:07 -08:00
'Refactored by Sourcery'
This commit is contained in:
@@ -24,11 +24,10 @@ def play_game() -> None:
|
||||
int(item)
|
||||
for item in input("\nGuess # " + str(turn) + " ? ").split(",")
|
||||
]
|
||||
if len(user_input) == 2:
|
||||
if sum(1 < x < number_max for x in user_input) == 2:
|
||||
user_guess = user_input
|
||||
else:
|
||||
raise ValueError
|
||||
if len(user_input) != 2:
|
||||
raise ValueError
|
||||
if sum(1 < x < number_max for x in user_input) == 2:
|
||||
user_guess = user_input
|
||||
else:
|
||||
raise ValueError
|
||||
except (ValueError, IndexError):
|
||||
|
||||
Reference in New Issue
Block a user