On 03/20/2015 06:20 PM, [email protected] wrote:
Thank you Danny Yoo for replying.
I figured out what to do for the isLegalMove but I ran into another problem. I
now get a traceback error every chip is black.
This is the traceback:
Traceback (most recent call last):
File "C:\Python34\lib\tkinter\__init__.py", line 1487, in __call__
return self.func(*args)
File "u:\code\reversiguiapp.py", line 83, in _cbMouseClick
TypeError: makeMove() takes 2 positional arguments but 3 were given
Exception in Tkinter callback
# Performs an actual move in the game. That is the current player places
# one of his chips in the square at position (row, col).
def makeMove( row, col ):
Don't you need a 'self' parameter to this method, like all the others?
if isALineOfAttack(row, col, 1, 1) is True :
if self._currentPlayer == 1 :
self._gameBoard[row, col] = BLACK
else :
self._gameBoard[row, col] = WHITE
--
DaveA
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor