Update of /cvsroot/pythoncard/PythonCard/samples/ataxx
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26478/samples/ataxx
Modified Files:
ataxx.py
Log Message:
fixed exceptions by commenting out references to computer move code
Index: ataxx.py
===================================================================
RCS file: /cvsroot/pythoncard/PythonCard/samples/ataxx/ataxx.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ataxx.py 12 Aug 2004 19:18:49 -0000 1.2
--- ataxx.py 25 Aug 2004 20:45:41 -0000 1.3
***************
*** 135,152 ****
self.computer = COMPUTER
self.lastHover = None
! if self.computer == HUMAN:
! self.boardModel.doComputerMove(HUMAN)
!
! def computerMove(self):
! if self.menuBar.getChecked('menuStrategyFlipMostPieces'):
! self.boardModel.doFlipMostPiecesComputerMove(self.computer)
! else:
! self.boardModel.doRandomComputerMove(self.computer)
! # sleep for a second to make it appear
! # the computer thought long and hard on her choice :)
! time.sleep(1)
! self.drawBoard()
! self.updateStatus()
def newGame(self):
--- 135,157 ----
self.computer = COMPUTER
self.lastHover = None
! self.startLocation = None
! ## # this is leftover from the reversi sample
! ## # and has to be updated once there is an ataxx computer strategy
! ## # rather than just human vs. human
! ## if self.computer == HUMAN:
! ## self.boardModel.doComputerMove(HUMAN)
! ##
! ##
! ## def computerMove(self):
! ## if self.menuBar.getChecked('menuStrategyFlipMostPieces'):
! ## self.boardModel.doFlipMostPiecesComputerMove(self.computer)
! ## else:
! ## self.boardModel.doRandomComputerMove(self.computer)
! ## # sleep for a second to make it appear
! ## # the computer thought long and hard on her choice :)
! ## time.sleep(1)
! ## self.drawBoard()
! ## self.updateStatus()
def newGame(self):
***************
*** 154,159 ****
self.drawBoard()
self.updateStatus()
! if self.computer == BLACK:
! self.computerMove()
def drawCell(self, x, y, state):
--- 159,164 ----
self.drawBoard()
self.updateStatus()
! ## if self.computer == COMPUTER:
! ## self.computerMove()
def drawCell(self, x, y, state):
|