May 09, 2004

And so its done. Source has been uploaded. Tim, sample starfish class has been provided. It needs more work, but it works :-)

The algorithm for drawing the grid has its complexity reduced by a factor of 4, down from O(n^2) to O((n/2)^2), using interlaced rectangles. Quick note about some of the changes:
This is no longer an abstract. Assign the name variable in the class constructor to set the name of the organism

Ignore this. I use it to make drawing the various organisms easier. You may play with it if you want, but unless you know what you are doing, don't touch it.

Set these in the class constructor to make your organisms pretty. Right now, there are only 8 combinations. This will also be worked on

Tim, use this to find the location of the closest what not

This needs to be extended to support the predator array, so keep it in mind, that for now, whilst you can "hunt" other starfish, you can't eat them. Yet.

An abstract class inheriting from Organism that provides several useful things. Read the code and comment for more details

Screen shots:

[Thats actually 3 starfish on top of each other (red dot)]

[New class relation diagram. Messy]


steve@Geofront::~>wc -l /share/tmp/*
265 /share/tmp/
17 /share/tmp/
195 /share/tmp/
175 /share/tmp/
74 /share/tmp/
578 /share/tmp/
171 /share/tmp/
111 /share/tmp/
75 /share/tmp/
409 /share/tmp/
204 /share/tmp/
166 /share/tmp/
53 /share/tmp/
2493 total

Sorry Glen, we have no where *near* 4000 lines, we might hit 3000. Bad guestimate on my part.

Code will be frozen by Monday hopefully, Tuesday at the latest.