Beispiel #1
0
 public void SwitchState(IGathererState state)
 {
     if (CurrentState.GetType() == state.GetType())
     {
         return;
     }
     CurrentState = state;
 }
Beispiel #2
0
 public Gatherer(int food, List <ResourceAmount> allProducts, List <ResourceAmount> initialProducts) : base(food, initialProducts)
 {
     AllProducts  = allProducts.Select(p => new ResourceAmount(p.Type, p.Amount)).ToList();
     CurrentState = new FreeState();
 }