Skip to content

Instantly share code, notes, and snippets.

def check_tic_tac_toe(matrix):
#bovenste rij
if matrix[0][0] == matrix[0][1] == matrix[0][2]:
print("player ", matrix[0][0], " won!")
#rechter kolom
if matrix[0][2] == matrix[1][2] == matrix[2][2]:
print("player ", matrix[0][2], " won!")
#onderste rij
if matrix[2][0] == matrix[2][1] == matrix[2][2]:
print("player ", matrix[2][0], " won!")