def __eat(self, bug: Bug): if self.__list[0] == bug.point[0]: #虫子瞬移 bug.quickly_move(self.__list) #蛇会加长 self.__list.append(self.__list[-1])