Actually fix the diagnoal checks
This commit is contained in:
parent
4a95079c5c
commit
0cec60d20c
1 changed files with 2 additions and 2 deletions
|
@ -76,9 +76,9 @@ class Board:
|
||||||
return result
|
return result
|
||||||
|
|
||||||
# Check diagonals.
|
# Check diagonals.
|
||||||
for x,y,z in [(0, 4, 8), (2, 4, 6)]:
|
for x,y,z in ((0, 4, 8), (2, 4, 6)):
|
||||||
diag = b[x] + b[y] + b[z]
|
diag = b[x] + b[y] + b[z]
|
||||||
result = __check(col)
|
result = __check(diag)
|
||||||
if result:
|
if result:
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue