Glotmorf on 4 Apr 2003 15:09:01 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [spoon-discuss] 2GCs


--- Daniel Lepage <dplepage@xxxxxxxxxxxx> wrote:
> Say, what happens if a 2GC gets a method from two
> parents? Like, if 
> class foo inherits from class spoo and class fleem,
> both of which have 
> a bar() method... which method does foo get? Spoo's
> bar, or Fleem's 
> bar, or do both happen when it's called, or what?

>From subsection C: "If a 2GO or 2GC declares it
inherits from more than one 2GC, and Properties or
Methods of the inherited-from 2GCs are in conflict,
priority is given to inherited-from 2GCs in the order
of declaration."  So it would depend on whether Spoo
or Fleem was named first.

> And a suggestion:
> 	It might make things easier if 2GC methods were
> divided into two 
> classes - abilities and uses. Abilities are things
> objects do 
> themselves, whether because they are directly
> controlled by Agents or 
> because the rules decree that they do something;
> Uses are things that 
> other objects can do with a given object.
> 	Each Use/Abil could have two sets of attributes -
> requirements and 
> costs. The former would be a list of conditions the
> user would have to 
> meet; the latter would be what must be expended to
> use the object.
> 
> The problem lies in classifying some of the general
> powers... like, is 
> Throw a use of Throwable objects, or an Ability of
> Players? I'm leaning 
> more towards a Use...

My terminology comes, sadly enough, from the Visual
Basic model.  Methods would be something that can be
done to the object, and, since most objects don't have
free will, that'll be just about everything.

I think what you're looking for is Events.  Things
like OnEndOfNweek(), that sort of thing.  That might
be handy, especially if it's indexable, since Dave
could just do a select on each type of event to see
what has to be done regarding what.

But since this is a framework thang anyway, and since
there are enough objects to play with that don't have
events, we can probably go ahead and put this in this
nweek and add events next nweek.  We'll have to create
a base class or a few base classes anyway, so we won't
be rewriting everything right away.

Regarding Throw...I'd say that's exclusively a method
that can be done to objects, and in the context of
that would be specified what acting entity can use the
method.  I'm not sure we really need to specify what
things a player can do, as much as what things can be
done to an object and what has permission to do those
things.  Throw could be a base method for objects,
only available if the object is flagged CanBeThrown,
and overridden by special things like the football. 
Would you want to go as far as requiring the acting
entity to have a CanThrow flag?

-- Glotmorf


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss