#NEWLINE# def isStalemate( self ) : #NEWLINE# #INDENT# if ( len ( self . getAllMovesLegal ( self . currentSide ) ) == 0 ) : #NEWLINE# #INDENT# for move in self . getAllMovesUnfiltered ( ( not self . currentSide ) ) : #NEWLINE# #INDENT# pieceToTake = move . pieceToCapture #NEWLINE# if ( pieceToTake and ( pieceToTake . stringRep == 'K' ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return True #NEWLINE# #UNINDENT# return False