[Home] [Groups] - Message: [Prev in Group] [Next in Group]
20682: Re: [MUD-Dev] SMAUG Code (was Personality Types)
[Full Header] [Plain Text]
From: "Kwon Ekstrom" <justice@softhome.net>
Newsgroups: nu.kanga.list.mud-dev
Date: Thu, 23 Aug 2001 19:23:11 -0600
References: [1] [2] <-newest
Organization: Kanga.Nu
From: "Miroslav Silovic" <silovic@zesoi.fer.hr>
> "Alistair Milne" <krug@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@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev