#include "Rule.h" class Garden { public: Garden(void); ~Garden(void); bool Pixel( int x, int y, int depth ); void Grow( Rule* ); int Depth() { return depth; }; void ClearScratch(); Fitness GetFitness( float dr, float dg, float db ); int ClumpCount(); int TotalCount(); private: void CreateChildren( Rule* rule ); void ConnectChildren(); Garden* child; //array Garden* parent; //References to siblings. Garden* u; Garden* d; Garden* l; Garden* r; bool value; float dr; float dg; float db; int s; int p; bool connected; //are children connected? int depth; //number of child layers };
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 4790 | Sam Stafford |
SquareCraft optimizations... patterns are now only recalculated when the rules change, not when the depth or colors do. |
||
#1 | 4776 | Sam Stafford | A simple Qt frontend to the "squaregarden" algorithms. | ||
//guest/sam_stafford/garden/src/Garden.h | |||||
#1 | 4772 | Sam Stafford | Something I've been doodling with. |