[Circle] Re: Random Room

From: Mark McArthey (mcarthey@mfa.com)
Date: 07/25/96

On Wed, 24 Jul 1996, Skylar wrote:

> If you MUST have a real room with actual exits to enter it, you should just
> go ahead and make the room and not connect it, then use some algorithm to
> find a suitable location (again, teleport would work fine) - once you find
> your random room, just check the exits and when you find one that doesnt
> exist, make a two-way exit to your unconnected room and from it to the
> room you've randomly chosen... that is, if it has any free exit's, else
> just ditch it and try for another random room until you find one with an
> unused exit direction...

Ok, this sounds like a feasible solution for what I'd like to do.  I'm
sure I can pull this off.  Another question comes to mind though.  Even
though this is not an event that will happen often, I'd still like to find
an efficient way to accomplish it.  Is there a method for finding rooms
that have an available exit without having to search sequentially through
the world file?  I'd like this to remain basically a random search through
a random zone, but I don't want it to take a long time to happen.
Understandable I suppose.  

Any thoughts?

 Mark McArthey          `  _ ,  '
 mcarthey@execpc.com   -  (o)o)  -

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |

This archive was generated by hypermail 2b30 : 12/07/00 PST