T
Tim Mcd
So, I am currently working on an Interactive Fiction like game in Ruby,
and have stumbled across a bit of a problem. The 'move' function makes a
call to the room's 'exits' variable (exits[:north], for instance) but I
want it to catch if the variable :north doesn't exist to display
something like "You can't go taht way!". I can't figure out how to do
this with my meager skills.
Any help would be greatly appreciated!
and have stumbled across a bit of a problem. The 'move' function makes a
call to the room's 'exits' variable (exits[:north], for instance) but I
want it to catch if the variable :north doesn't exist to display
something like "You can't go taht way!". I can't figure out how to do
this with my meager skills.
Any help would be greatly appreciated!