On Fri, Sep 14, 2007 at 04:46:22PM +0200, Piotr wrote:
> could be changed the way that they are movable buildings.
>
> object = ship + building
>
> Or is this too difficult?
Nothing's too difficult at this stage - strike, while the codebase is
small ;)
A better way to do it might be to define a 'mix in' class which could
contain other objects (eg Container). Ships and Buildings would then both be
subclasses of Container. I'm pretty sure Atlantis v4 goes along these
lines, so you might want to have a look at the code from there.
In other words:
Ship = Container + ship stuff
Building = Container + building stuff
Other ideas for this spring to mind - Armies/Schools would be a subclass too
when they get added. Cities within regions, or even regions themselves
are also possibilities, so you'd want the possibility of adding various
different objects in, not just units.
Anthony
--
------------------------------------------------------
HyPerACtIVe?! HEY, Who ArE yoU cAllInG HYPERaCTive?!
ab...@we...
------------------------------------------------------
|