我对Python还比较陌生,正在创建一个基本的Python RPG wordquest类型的游戏。我一直在def showInstructions():
上得到一个无效的语法。你知道吗
rooms = {
1 : { "name" : "Hall" },
2 : { "name" : "Bedroom" },
3 : { "name" : "Kitchen" },
4 : { "name" : "Bathroom" }
def showInstructions():
#The Main Menu
print ("Mr Bailey's Nightmare!")
print ("======================")
print ("Commands:")
print ("go [direction]'")
def showStatus
#shows player stats, essentially current room
print ("---------------------------------------------------------")
print ("You are in the " + rooms[currentRoom]["name"]
print ("---------------------------------------------------------")
您需要关闭
rooms
dict:需要
所以呢
而且你的语法在
showStatus
处也很混乱相关问题 更多 >
编程相关推荐