mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-22 07:10:42 -08:00
MAINT: Apply pre-commit
Remove byte-order-marker pre-commit check as there would be many adjustments necessary
This commit is contained in:
@@ -20,8 +20,10 @@ def play_game():
|
||||
user_guess = [-1, -1]
|
||||
while user_guess == [-1, -1]:
|
||||
try:
|
||||
user_input = [int(item) for item in input(
|
||||
"\nGuess # " + str(turn) + " ? ").split(",")]
|
||||
user_input = [
|
||||
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
|
||||
@@ -65,8 +67,7 @@ def main():
|
||||
keep_playing = True
|
||||
while keep_playing:
|
||||
play_game()
|
||||
keep_playing = input(
|
||||
"\nTry again. ").lower().startswith("y")
|
||||
keep_playing = input("\nTry again. ").lower().startswith("y")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user