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
[Thats actually 3 starfish on top of each other (red dot)]
[New class relation diagram. Messy]
steve@Geofront::~>wc -l /share/tmp/*
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.