void World::initialiseStatesAndStats() { // Initialise sheep states mSheepStates.push_back(std::unique_ptr<LookOutForDog>(new LookOutForDog)); mSheepStates.push_back(std::unique_ptr<EvadeDog>(new EvadeDog)); mSheepStates.push_back(std::unique_ptr<Relax>(new Relax)); mSheepStates.push_back(std::unique_ptr<Exit>(new Exit)); mEntityStats.push_back(EntityStats("data/entityStats/sheepStats.dat")); mEntityStats.push_back(EntityStats("data/entityStats/dogStats.dat")); }
EntityStats EntityStats::operator-(int val)const { return EntityStats(pv, pi, fat, frc - val, intel - val, def - val, mdef - val, esq - val, dex - val, vatq - val, chc - val, chrm - val, mvt ); }
EntityStats EntityStats::operator-(const EntityStats& other)const { return EntityStats(pv - other.pv, pi - other.pi, fat - other.fat, frc - other.frc, intel - other.intel, def - other.def, mdef - other.mdef, esq - other.esq, dex - other.dex, vatq - other.vatq, chc - other.chc, chrm - other.chrm, mvt - other.mvt ); }
EntityStats EntityStats::operator+(int val)const { return EntityStats(pv, pi, fat, frc + val, intel + val, def + val, mdef + val, esq + val, dex + val, vatq + val, chc + val, chrm + val, mvt ); }
EntityStats EntityStats::operator+(const EntityStats& other)const { return EntityStats(pv + other.pv, pi + other.pi, fat + other.fat, frc + other.frc, intel + other.intel, def + other.def, mdef + other.mdef, esq + other.esq, dex + other.dex, vatq + other.vatq, chc + other.chc, chrm + other.chrm, mvt + other.mvt ); }