from random import choicecave_numbers=range (0,20)unvisited_caves=range(0,20)visited_caves=[]caves = setup_caves(cave_numbers)visit_cave(0)print_caves()link_caves()print_caves()finish_caves()wumpus_location=choice(cave_numbers)player_location=choice(cave_numbers)while player_location==wumpus_location:player_location=choice(cave_numbers)while True:print_location=(player_location)new_location=get_next_location()if new_location is not None:player_location=new_locationif player_location==wumpus_location:print 'hahahahahhahha'break
1 回答
www说
TA贡献1775条经验 获得超8个赞
你确定是setuo_caves而不是 setup_caves is not defined????如果是后者你在setup_caves函数前边加上choice.也就是写成choice.setup_caves如果是前者的话我找不出你说的错误!
添加回答
举报
0/150
提交
取消