Skip to content

Instantly share code, notes, and snippets.

@rescurib
Created December 6, 2019 19:54
Show Gist options
  • Save rescurib/7ff39299869790f0538a466a76caeab9 to your computer and use it in GitHub Desktop.
Save rescurib/7ff39299869790f0538a466a76caeab9 to your computer and use it in GitHub Desktop.
class Estado():
Tablero = [[0,0,0],[0,0,0],[0,0,0]]
Eval = 0
def tablleno(self):
for i in range(3):
for j in range(3):
if self.Tablero[i][j]==0:
return False
return True
def turnoX(self):
c = 0
for i in range(3):
for j in range(3):
if self.Tablero[i][j]==1:
c += 1
if self.Tablero[i][j]==2:
c -= 1
return c==0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment