starting on round logic
This commit is contained in:
20
src/Creature.cpp
Normal file
20
src/Creature.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "Creature.h"
|
||||
|
||||
bool SpeciesEatsWhenNormal(Species species) {
|
||||
switch (species) {
|
||||
|
||||
case Species::Raccoon:
|
||||
case Species::Opossum:
|
||||
return true;
|
||||
case Species::Fox:
|
||||
case Species::Deer:
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WouldEatMarshmallow(const Creature &c) {
|
||||
bool n = SpeciesEatsWhenNormal(c.species);
|
||||
return c.behaves_normally ? n : !n;
|
||||
}
|
||||
Reference in New Issue
Block a user