mirror of
https://github.com/coding-horror/basic-computer-games.git
synced 2025-12-25 20:34:32 -08:00
Removed Commented Line
This commit is contained in:
@@ -84,7 +84,6 @@ def move(board):
|
||||
return False
|
||||
|
||||
def main():
|
||||
# if input("Do you want instrunctions?\n").lower().startswith("y"):
|
||||
print(" " * 33 + "H-I-Q")
|
||||
print(" " * 15 + "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY")
|
||||
print_instructions()
|
||||
@@ -94,8 +93,8 @@ def is_game_finished(board):
|
||||
for pos in board.keys():
|
||||
if board[pos] == "X":
|
||||
for space in [1,9]:
|
||||
nextToPeg = ((pos + space) in board) and board[pos + space] == "X"
|
||||
hasMovableSpace = (not ((pos - space) in board and board[pos - space] == "X")) or (not ((pos + space * 2) in board and board[pos + space * 2] == "X"))
|
||||
nextToPeg = ((pos + space) in board) and board[pos + space] == "!"
|
||||
hasMovableSpace = (not ((pos - space) in board and board[pos - space] == "!")) or (not ((pos + space * 2) in board and board[pos + space * 2] == "!"))
|
||||
if nextToPeg and hasMovableSpace:
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user