Exemple #1
0
 public MotorBoat(BoatData boatData) : base(boatData)
 {
     if (boatData.Prefix != CodePrefix)
     {
         throw new InvalidCastException("The prefix doesn't match this type.");
     }
     HorsePower = boatData.Characteristic;
 }
Exemple #2
0
 public RowingBoat(BoatData boatData) : base(boatData)
 {
     if (boatData.Prefix != CodePrefix)
     {
         throw new InvalidCastException("The prefix doesn't match this type.");
     }
     MaxPassengers = boatData.Characteristic;
 }
Exemple #3
0
 public Catamaran(BoatData boatData) : base(boatData)
 {
     if (boatData.Prefix != CodePrefix)
     {
         throw new InvalidCastException("The prefix doesn't match this type.");
     }
     BedCount = boatData.Characteristic;
 }
Exemple #4
0
        private void AddBoat(BoatData boatData, int index, int berthedFor = 0)
        {
            var boat = Boat.FromData(boatData);

            AddBoat(boat, index, berthedFor);
        }
Exemple #5
0
 protected Boat(BoatData boatData)
 {
     Weight   = boatData.Weight;
     TopSpeed = boatData.TopSpeed;
     Code     = boatData.Code;
 }