[ADMIN-CODE] Simple Distance code question

From: Pure Krome (pure@bluep.com)
Date: 05/09/00


Hello again.

    Simple recursive question.

    I've been pondering over the use of distance in circle, in regards to
things like (but not limited to) communication.

    Lets keep it simple firstly. Lets say each room is the same size. How
can i find all the rooms in a 10 square radius. This means it's like a
circle. 10 rooms north, south, east and west also mean that the furthest
room to the North East would be north 7 and across 7, say . mapping that
maps a *rough* ascii circle.


    This assumes all rooms are mapped out, next to each other, etc..

    But what happens if rooms link back to themselves, like a MAZE effect?

    What about each room determining the effect of the distance remaining ?
Eg. A underground room might double the current remaining distance, but if
(recursively along the depth thru), it finds a room that is forest, the
distance now is reduced, say. In effect, the distance is now possibly not
circular (if you map it from above on a grid map), but each child from the
starting room (node) may differ in length.

    Hmm. i hope this all made sence?

    One way to find out =)

    *click send*

-PK-


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/10/01 PDT