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)
|
inp = int(inp)
|
||||||
break
|
break
|
||||||
except:
|
except:
|
||||||
|
clear()
|
||||||
|
printBoard(board)
|
||||||
print("Only integers allowed")
|
print("Only integers allowed")
|
||||||
|
|
||||||
return inp
|
return inp
|
||||||
|
|
@ -86,9 +88,14 @@ while playing:
|
||||||
tile = findLowest(board, chosenColumn)
|
tile = findLowest(board, chosenColumn)
|
||||||
break
|
break
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print("You chose a column that is full. Try again")
|
|
||||||
clear()
|
clear()
|
||||||
printBoard(board)
|
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 = ""
|
tile = ""
|
||||||
|
|
||||||
board[chosenColumn][tile] = turn
|
board[chosenColumn][tile] = turn
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user