lib/IFMapper/Room.rb in ifmapper-0.9.5 vs lib/IFMapper/Room.rb in ifmapper-0.9.6
- old
+ new
@@ -74,12 +74,10 @@
#
# Return the number of exits present in room
#
def num_exits
- num = 0
- @exits.each { |e| num += 1 if e }
- return num
+ return @exits.nitems
end
#
# Return a direction from the vector of the exit that would take
# us to the 'b' room more cleanly.