From b362b3fe1da40e8f9dcf610818b2b2f0261b0aab Mon Sep 17 00:00:00 2001 From: Vincent Rodley Date: Fri, 1 Aug 2025 11:14:54 +1200 Subject: [PATCH] i dont think there are any bugs. win detection time. --- main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 8dce86c..cce0ced 100644 --- a/main.py +++ b/main.py @@ -52,6 +52,8 @@ def getIntInput(prompt): inp = int(inp) break except: + clear() + printBoard(board) print("Only integers allowed") return inp @@ -86,9 +88,14 @@ while playing: tile = findLowest(board, chosenColumn) break except ValueError: - print("You chose a column that is full. Try again") clear() printBoard(board) + print("You chose a column that is full. Try again") + tile = "" + except IndexError: + clear() + printBoard(board) + print("You chose a column outside of the board. Try again") tile = "" board[chosenColumn][tile] = turn