I'm not a skillful programmer by any means, but everyone's got to start somewhere. I've been trying to make a (very) basic maze-type in ruby, but I'm having difficulty with the while loop not exiting.
Room layout is an upside down t:
5 2 103 4
Going north twice from the center should change @loc to 5, say "End", and exit the loop:
elsif @loc == 2
@loc = 5
puts "End"
But it returns to the beginning of the while loop, stranding the player.
EDIT: there's some confusion about the code, so I'm removing the block and pointing you to http://pastebin.com/EFWVBAhn