Hunt the Wumpus: Difference between revisions

m
Line 228:
println("AHA! YOU GOT THE WUMPUS!")
return("win")
elseif any(x -> roomcontents[x] == "Wumpus", rooms[arrowroom])
numrooms = rand([0, 1, 2, 3])
if numrooms > 0
println("...OOPS! BUMPED A WUMPUS!")
wroom = rooms[arrowroom][findfirst(x -> roomcontents[x] == "Wumpus", rooms[arrowroom])]
for i in 1:3
tmp = wroom
4,103

edits