mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 04:15:45 -08:00
Python: Add type annotations to all 'print' functions (#662)
* Add test to superstartrek and fixes several issues in superstartrek - I probably introduced them 🙈
* Mastermind type annotations
This commit is contained in:
@@ -36,8 +36,8 @@ def flip_bits(
|
||||
"""
|
||||
while m == n:
|
||||
r = r_function(n)
|
||||
n = r - int(math.floor(r))
|
||||
n = int(10 * n)
|
||||
n_tmp = r - int(math.floor(r))
|
||||
n = int(10 * n_tmp)
|
||||
if row[n] == "X":
|
||||
row[n] = "O"
|
||||
break
|
||||
@@ -46,7 +46,7 @@ def flip_bits(
|
||||
return row, n
|
||||
|
||||
|
||||
def print_instructions():
|
||||
def print_instructions() -> None:
|
||||
print(" " * 32 + "FLIPFLOP")
|
||||
print(" " * 15 + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY")
|
||||
print("\n" * 2)
|
||||
|
||||
Reference in New Issue
Block a user