//--------------------------------------------------------------------------- #include #include #pragma hdrstop #include "cell1.h" #include "globals.h" //--------------------------------------------------------------------------- #pragma package(smart_init) kjsfhksdf Cell1::Cell1(pAuditory pa,int xx,int yy) : GrCell(pa,xx,yy) { initialize(); }; int Cell1::isStanding() { return standing; }; #define STANDAPPLAUS 10 DECLAREGAUSS(InitialApplaus,7,3); #define CONFORMITY 0.2 void Cell1::recalculate() { nowApplaus=applaus*(1-CONFORMITY)+CONFORMITY*(auditory->getGlobalGood()); nowStanding=(applaus>=STANDAPPLAUS); }; void Cell1::initialize() { GrCell::initialize(); GETGAUSSpositive(applaus,InitialApplaus); standing=(applaus>=STANDAPPLAUS); };