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); }
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)); }