/// <summary> /// Equip diver with adequate equipment for dive /// - Hope your eyes won't bleed on this one /// </summary> /// <param name="diver">Diver that we're equipping</param> /// <param name="dive">Dive for which we're equipping diver</param> public void EquipDiver(Diver diver, Dive dive) { // Equip with basic equipment if (EquipmentHelper.IsBasicEquipment(this)) { LendEquipment(dive, diver); } // Equip with dry suit else if (dive.temperature < Constants.TEMPERATURE_BOUNDARY && EquipmentHelper.IsDrySuit(this) && !diver.CheckIfDiverNeedUndersuit()) { LendEquipment(dive, diver); } // Equip with undersuit else if (EquipmentHelper.IsUndersuit(this) && diver.CheckIfDiverNeedUndersuit()) { LendEquipment(dive, diver); } // Equip with wet suit else if (dive.temperature >= Constants.TEMPERATURE_BOUNDARY && EquipmentHelper.IsWetSuit(this)) { LendEquipment(dive, diver); } // Equip with hood if needed else if (dive.temperature >= 15 && EquipmentHelper.IsHood(this) && diver.CheckIfDiverNeedHood()) { LendEquipment(dive, diver); } // Equip with equipment for night dive else if (dive.isNightDive && needForNightDive == Constants.EQUIPMENT_NEEDED && diver.CheckIfDiverHasSuperPower(Constants.NIGHT_DIVE)) { LendEquipment(dive, diver); } // Equip with equipment for photographers else if (dive.numOfPhotographers > 0 && diver.CheckIfDiverHasSuperPower(Constants.PHOTOGRAPHER) && needForRecording == Constants.EQUIPMENT_NEEDED) { LendEquipment(dive, diver); } // Additional equipment else if (EquipmentHelper.IsAdditionalEquipment(this) && temperature != "#" && dive.temperature < 20 || EquipmentHelper.IsAdditionalEquipment(this) && temperature == "#") { LendEquipment(dive, diver); } }