namespace EDPlayerJournal;
///
/// Static strings related to combat zones
///
public class CombatZones {
///
/// Type string for ground combat zone
///
public static readonly string GroundCombatZone = "Ground";
///
/// Type string for ship combat zones
///
public static readonly string ShipCombatZone = "Ship";
///
/// AX combat zone
///
public static readonly string AXCombatZone = "AX";
///
/// Difficulty low
///
public static readonly string DifficultyLow = "Low";
///
/// Difficulty medium
///
public static readonly string DifficultyMedium = "Medium";
///
/// Difficulty high
///
public static readonly string DifficultyHigh = "High";
///
/// Very high difficulty, so far AX combat zone only
///
public static readonly string DifficultyVeryHigh = "Very High";
///
/// Returns the given combat zone difficulty as an integer, so it can be sorted.
/// 0 = lowest difficulty, 1 = medium and so forth.
///
public static int? DifficultyRank(string? difficulty) {
Dictionary ranks = new() {
{ DifficultyLow, 0 },
{ DifficultyMedium, 1 },
{ DifficultyHigh, 2 },
{ DifficultyVeryHigh, 3 }
};
if (difficulty == null ) {
return null;
}
if (ranks.TryGetValue(difficulty, out int rank)) {
return rank;
}
return null;
}
}