Did I find the right examples for you? yes no Crawl my project Python Jobs
All Samples(2) | Call(2) | Derive(0) | Import(0)
Make move specified by (r, c, flip): Create a piece at (r, c), and for each (R, C) in `flip', flip the piece at (R, C). To animate flipping, pass in a function `animatefunc' to be called between piece flips.
src/p/y/pythello-0.1/pythello/boardtk.py pythello(Download)
def makemove(self, r, c, flip): Board.makemove(self, r, c, flip, animatefunc=self.animatefunc) def switchplayers(self, printboard=False, lostturn=False): if lostturn:
src/p/y/pythello-0.1/pythello/player.py pythello(Download)
for (r, c, flip) in moves: boardc = Board(other=board) # "copy constructor" boardc.makemove(r, c, flip) boardc.switchplayers() value = -self.minimax(boardc, depth-1, -beta, bestval and -bestval or inf)[0]