def eq(self, obj): # 相等的判断
return self.state == obj.state
def __ne__(self, obj): # 不等的判断
return not self.__eq__(obj)
def print_state(self):
for row in range(Lenth):
for col in range(Lenth):
print('%3d' % self.state[row][col], end='')
print('')
print('--------------------')
def print_node(self):
print("gn=%d,hn=%d,fn=%d" % (self.gn, self.hn, self.fn))
self.print_state()