Exit.rb

RubyMud/Exit.rb · 351 B

From the archive rbmud-0.1rc2.tar.gz

Download the archive   « Back to the archive contents

require 'drb'

module RubyMud
class Exit

	include DRbUndumped

	attr_accessor :rooms

	# Given a room, what is the other room ?
	def otherRoom(room)
		keys = rooms.keys
		return keys[0] if keys[0] != room
		return keys[1]
	end

	def initialize(room1,room1names,room2,room2names)
		@rooms = {room1=>room1names,room2=>room2names}
	end
end

end #module

Site Stats

Snippets: 1791
Codebases: 571