public void SearchFood(int time) { for (var i = 0; i < time; i++) { _state = _energyDecrementModifierModifier.Modify(_state); } }
public Tamagotchi(State state, IStateModifier energyDecrementModifierModifier, IStateModifier timeModifier, IDictionary<Food, IStateModifier> foodReaction) { _state = state; _energyDecrementModifierModifier = energyDecrementModifierModifier; _timeModifier = timeModifier; _foodReaction = foodReaction; }
public void TimeDec() { _state = _timeModifier.Modify(_state); }
public void PushFood(Food food) { _state = _foodReaction[food].Modify(_state); Console.WriteLine("Food " + food.Name + " is eaten"); }