mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 12:25:10 -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:
@@ -6,7 +6,7 @@ def introduction():
|
||||
print(
|
||||
"""The object of this game is to find 4 mugwumps
|
||||
hidden on a 10*10 grid. Homebase is position 0,0.
|
||||
Any guess you make must be two numbers with each
|
||||
Any guess you make must be two numbers with each
|
||||
number between 0 and 9 inclusive. First number
|
||||
is distance to right of homebase, and second number
|
||||
is the distance above homebase."""
|
||||
@@ -37,6 +37,7 @@ def calculate_distance(guess, mugwump):
|
||||
d = sqrt(((mugwump[0] - guess[0]) ** 2) + ((mugwump[1] - guess[1]) ** 2))
|
||||
return d
|
||||
|
||||
|
||||
def play_again():
|
||||
print("THAT WAS FUN! LET'S PLAY AGAIN.......")
|
||||
choice = input("Press Enter to play again, any other key then Enter to quit.")
|
||||
@@ -45,6 +46,7 @@ def play_again():
|
||||
else:
|
||||
exit()
|
||||
|
||||
|
||||
def play_round():
|
||||
mugwumps = generate_mugwumps()
|
||||
turns = 1
|
||||
|
||||
Reference in New Issue
Block a user