Example #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;
 }
Example #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;
 }
Example #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;
 }
Example #4
0
        private void AddBoat(BoatData boatData, int index, int berthedFor = 0)
        {
            var boat = Boat.FromData(boatData);

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