Skip to content

Commit 21f4793

Browse files
committed
fix tic-tac-toe.py 1 errors
1 parent dfa926f commit 21f4793

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tic-tac-toe.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ def CheckWin():
9090
board[choice] = Mark
9191
player += 1
9292
CheckWin()
93-
93+
if choice < 1 or choice > 9:
94+
print("Invalid Position! Please choose a position between 1 and 9.")
95+
time.sleep(2)
96+
continue
9497
os.system("cls")
9598
DrawBoard()
9699
if Game == Draw:

0 commit comments

Comments
 (0)