以下代码给了我错误:
if self.from_position in self.supporters or
^
SyntaxError: invalid syntax
代码:
def validate_move_piece(self):
if self.from_position in self.supporters or
(self.turn == 'X' and self.from_position == self.player_x) or
(self.turn == 'Y' and self.from_position == self.player_y) or
(self.last_position == self.from_position):
return True
else:
self.error = ERROR_MOVE_FORMAT
return False