Esempio n. 1
0
 def  start_Game(self):
     telo = Othello()
     print('*** Start game *** ')
     print("Jugadas : ",telo.actions(self.model))
     alpa = alphabeta_search(self.model,telo)
     print("Maquina pos nueva: ",alpa)
     self.model = telo.result(self.model,[alpa[0],alpa[1]])
     self.drawChips()
Esempio n. 2
0
 def __onClick(self, event):
         telo = Othello()
         i=int(event.y/self.cellheight)
         j=int(event.x/self.cellwidth)
         self.pos =(i,j)
         
         self.player = telo.to_move(self.model)
         lisMovValidos = telo.actions(self.model)
         lisNew = [i,j]
         movValido = False
         if self.model[i][j]==0 and lisNew in lisMovValidos:
             self.model = telo.result(self.model,[i,j])
             movValido = True
         if movValido:
             if(self.player==1):
                 self.player=2
             else:
                 self.player=1
             self.drawChips()
         """alpa = alphabeta_search(self.model,telo)