[MUD-Dev] SMAUG Code (was Personality Types)

Kwon Ekstrom justice at softhome.net
Thu Aug 23 19:23:11 CEST 2001


From: "Miroslav Silovic" <silovic at zesoi.fer.hr>
> "Alistair Milne" <krug at krug.org.uk> writes:

> The proper approach is multiple polymorphic dispatch (here
> demonstrated using TinyCLOS syntax, employed by Guile's GOOPS):

Actually I use interfaces to describe the handling of "most" common
areas.  I simply would do a check for the instance.  if (ch
instanceof canSee) ->bleh...

By breaking down larger objects into specific tasks using interfaces
I can reuse a larger amount of code, and it's a whole lot easier to
work with since the interface is standardized.  This is actually
almost a requirement since any Token can support a connection, and
Rooms, Creatures, and Items are all Tokens.

I suppose it'd be possible to design a system similar to how you're
describing but it'd require more overhead to update the systems.
Requiring an additional method depending on any changes necessary.
There's also other design considerations for my system because it's
in Java and makes heavy use of interfaces to define specific tasks.

-- Kwon Ekstrom

_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list