Add the rest of the major contests, .udc files and the registry
ARRL DX, IARU HF, Sweepstakes, RTTY Roundup, NAQP and general logging join CQ WW and CQ WPX. The Cabrillo QSO line is now built column by column by the contest, because Sweepstakes puts the callsign after the serial number where everyone else puts it first. User-defined contests read the subset of N1MM's .udc settings that covers the exchange, the dupe rule, points and up to three multipliers. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
32
src/Nonemm.Contests/Multipliers/StatesAndProvinces.cs
Normal file
32
src/Nonemm.Contests/Multipliers/StatesAndProvinces.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
namespace Nonemm.Contests.Multipliers;
|
||||
|
||||
/// US states and Canadian provinces, in the groupings contests count.
|
||||
public static class StatesAndProvinces
|
||||
{
|
||||
/// The 48 contiguous states.
|
||||
public static readonly IReadOnlySet<string> ContiguousStates = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
"AL", "AZ", "AR", "CA", "CO", "CT", "DE", "FL", "GA", "ID", "IL", "IN", "IA",
|
||||
"KS", "KY", "LA", "ME", "MD", "MA", "MI", "MN", "MS", "MO", "MT", "NE", "NV",
|
||||
"NH", "NJ", "NM", "NY", "NC", "ND", "OH", "OK", "OR", "PA", "RI", "SC", "SD",
|
||||
"TN", "TX", "UT", "VT", "VA", "WA", "WV", "WI", "WY",
|
||||
};
|
||||
|
||||
public static readonly IReadOnlySet<string> AllStates =
|
||||
new HashSet<string>(ContiguousStates.Concat(["AK", "HI"]), StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
/// The 13 Canadian provinces and territories.
|
||||
public static readonly IReadOnlySet<string> Provinces = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
"NS", "QC", "ON", "MB", "SK", "AB", "BC", "NT", "NB", "NL", "PE", "YT", "NU",
|
||||
};
|
||||
|
||||
/// What ARRL DX counts for a DX station: the contiguous states, the District
|
||||
/// of Columbia, and the Canadian provinces and territories.
|
||||
public static readonly IReadOnlySet<string> ArrlDxMultipliers =
|
||||
new HashSet<string>(ContiguousStates.Concat(["DC"]).Concat(Provinces), StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
public static bool IsStateOrProvince(string text) =>
|
||||
AllStates.Contains(text.Trim()) || Provinces.Contains(text.Trim()) ||
|
||||
text.Trim().Equals("DC", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
Reference in New Issue
Block a user