我对这个评估有疑问,“旧”,它是一个元组列表,当使用 bp_list 评估时应该评估 False,bp_list 是相同的元组列表,但项目更少。非常感谢你。
while True: # game loop
if dead_flag == True:
pygame.time.wait(2000)
dead_flag = False
MAINSURF.fill(BLACK)
thePill.drawPills(p_inventary)
oldpoints = points
p_inventary, points = thePill.eatenPill(pac._x, pac._y, p_inventary)
bigPill(*bp_list)
#### This is the problematic part
old = bp_list
print ">>>", old
bp_list = eatBig(bp_list, pac._x, pac._y)
print "---",bp_list
if (old != bp_list):
print "they're different"
print "##", old_bp_list
print "##", bp_list
score += 50
if oldpoints != points:
score = (basep - points) * 10
"""else:
print "old_bp_list ", old_bp_list
print "bp_list ", bp_list """
if p_inventary == []:
break