#NEWLINE# def doMove( self , c , pos ) : #NEWLINE# #INDENT# ' the action is a (color, position) tuple, for the next stone to move.\n        returns True if the move was legal. ' #NEWLINE# self . movesDone += 1 #NEWLINE# if ( not self . isLegal ( c , pos ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . _fiveRow ( c , pos ) : #NEWLINE# #INDENT# self . winner = c #NEWLINE# self . b [ pos ] = 'x' #NEWLINE# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . _setStone ( c , pos ) #NEWLINE# if ( self . movesDone == ( self . size [ 0 ] * self . size [ 1 ] ) ) : #NEWLINE# #INDENT# self . winner = self . DRAW #NEWLINE# #UNINDENT# return True