Added Post-Game prints

This commit is contained in:
Thomas Kwashnak
2022-01-13 08:45:48 -05:00
committed by GitHub
parent 679481ea23
commit 633c0137c7

View File

@@ -53,6 +53,17 @@ def play_game():
print_board(board)
while not move(board):
print("ILLEGAL MOVE! TRY AGAIN")
peg_count = 0
for key in board.keys():
if board[key] == '!':
peg_count += 1
print("YOU HAD " + str(peg_count) + " PEGS REMAINING")
if peg_count == 1:
print("BRAVO! YOU MADE A PERFECT SCORE!")
print("SAVE THIS PAPER AS A RECORD OF YOUR ACCOMPLISHMENT!")
def move(board):
try: