Example #1
0
 public Plane(string name, PlaneLocation location, int fuel,
              PassingTime passingTime, int maxFuel, PlaneDamage damage)
 {
     this.Name    = name;
     Location     = location;
     this.Fuel    = fuel;
     this.MaxFuel = maxFuel;
     this.Damage  = damage;
     passingTime.RegisterPlane(this);
 }
Example #2
0
 public static Plane Create(PlaneLocation location, int fuel, int maxFuel,
                            PassingTime passingTime, PlaneDamage damage, string name = "default")
 {
     return(new Plane(name: name, location: location, damage: damage,
                      fuel: fuel, maxFuel: maxFuel, passingTime: passingTime));
 }
Example #3
0
 public static Plane Create(PlaneLocation location)
 {
     return(Create(name: "default", location: location, fuel: int.MaxValue,
                   maxFuel: int.MaxValue, passingTime: new PassingTime(), damage: PlaneDamage.None));
 }
Example #4
0
 public static Plane Create(PlaneLocation location, int fuel, PassingTime passingTime)
 {
     return(Create(name: "default", location: location, fuel: fuel,
                   maxFuel: int.MaxValue, passingTime: passingTime, damage: PlaneDamage.None));
 }