mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-12 15:50:20 -08:00
Clean Code: Python
Fix issues found by flake8-bugbear: * Unused loop variables * assert statements in non-test code * mixing test code with production code * mark one excessive test which takes ~10min to run as 'slow'
This commit is contained in:
@@ -48,7 +48,7 @@ def play():
|
||||
if opponent_score >= 2 or player_score >= 2:
|
||||
break
|
||||
|
||||
for action in range(7):
|
||||
for _action in range(7):
|
||||
if random.randint(1, 10) > 5:
|
||||
# opponent swings
|
||||
punch = random.randint(1, 4)
|
||||
|
||||
Reference in New Issue
Block a user