예제 #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);
 }
예제 #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));
 }