i dont think there are any bugs. win detection time.
This commit is contained in:
parent
cb2c99c369
commit
b362b3fe1d
9
main.py
9
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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user