抱歉,标题含糊。我想知道为什么当我输入“环顾四周”时什么也没发生。该代码将保持运行状态,但不会输出任何应有的内容。
if PlayerPos==51: # Inside cottage
choice=input("You stand in the middle of the small, neat home, what do you do?")
checker=choice.lower().split()
for word in checker:
if word in directions:
print("You can move no further")
if choice.lower()=="go outside"or"go out"or"exit":
PlayerPos=0
elif choice.lower()=="look around":
print("You find two bread loafs and a small kitchen knife")
inventory.append("Bread Loaf")
inventory.append("Bread Loaf")
inventory.append("Kitchen Knife")
print(inventory)
continue
else:
print("I don't understand. Please reword your command")
continue```