> 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. Graphs. Adjacency tables are really useful here, and you can weight the distances between rooms according to the size of the room, or whatever other method strikes your fancy. Any decent computer science theory book should cover graphs in detail, including exactly what you are trying to do here. Angelfire for your free web-based e-mail. http://www.angelfire.com +------------------------------------------------------------+ | 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