Let the published .udc files score the contests they are written for
I wrote SA 10 and OK/OM DX SSB in code after two failed attempts at the download. The download works — the page posts a nonce with the form — and the files say I got both contests wrong. SA 10 is deleted from the code. Its file scores the station's log to the contact, where the code had the wrong Cabrillo name and counted its multipliers once in the contest rather than once per mode. OK/OM DX now covers the CW running only, which is what N1MM's class is for and what N1MM's own documentation says: the SSB running has different rules and a pair of .udc files, one for each side. The CW rules go back to the class, so Czechia and Slovakia are one side of the contest again. With the SSB files in place both of the station's SSB logs score to the contact. Reading those files turned up four things in the .udc reader: a file whose extension is upper case was passed over, `Country` was not read as a multiplier source, `OtherCountry` was not a points condition, and a section multiplier counted the serial numbers the other side of a contest sends. All Asian stays in code — N1MM has a class for it after all — with the Cabrillo name and the band table it uses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
@@ -4,7 +4,8 @@ namespace Nonemm.Contests.Rules;
|
||||
|
||||
/// The JARL All Asian DX contest. Only contacts with Asia count for a station
|
||||
/// outside it. The exchange is the operator's age, the points go by band, and
|
||||
/// each prefix worked counts once per band.
|
||||
/// each prefix worked counts once per band. An Asian station scores three
|
||||
/// times what a station outside Asia scores for the same contact.
|
||||
public sealed class AllAsian : Contest
|
||||
{
|
||||
private readonly ModeCategory mode;
|
||||
@@ -15,7 +16,7 @@ public sealed class AllAsian : Contest
|
||||
|
||||
public string DisplayName => $"All Asian DX {ModeLabel()}";
|
||||
|
||||
public string CabrilloName => mode == ModeCategory.Cw ? "AA-CW" : "AA-SSB";
|
||||
public string CabrilloName => mode == ModeCategory.Cw ? "AADX-CW" : "AADX-SSB";
|
||||
|
||||
public IReadOnlyList<ExchangeField> ExchangeFieldsFor(StationInfo me) =>
|
||||
[
|
||||
@@ -33,7 +34,14 @@ public sealed class AllAsian : Contest
|
||||
|
||||
public string SentExchangeFor(StationInfo me) => "";
|
||||
|
||||
public int PointsFor(QsoContext qso) => IsWorkable(qso) ? PointsOn(qso.Band) : 0;
|
||||
public int PointsFor(QsoContext qso)
|
||||
{
|
||||
if (!IsWorkable(qso))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return PointsOn(qso.Band) * (qso.Me.Continent == "AS" ? 3 : 1);
|
||||
}
|
||||
|
||||
public IReadOnlyList<Multiplier> MultipliersFor(QsoContext qso) =>
|
||||
IsWorkable(qso) && qso.Qso.Call.WpxPrefix() is { } prefix
|
||||
@@ -60,10 +68,11 @@ public sealed class AllAsian : Contest
|
||||
private static bool IsWorkable(QsoContext qso) =>
|
||||
qso.Continent == "AS" || qso.Me.Continent == "AS";
|
||||
|
||||
/// 160 metres is worth 3, 80 and 10 metres 2, and every other band 1.
|
||||
private static int PointsOn(Band? band) => band?.Name switch
|
||||
{
|
||||
"160M" or "80M" => 3,
|
||||
"40M" => 2,
|
||||
"160M" => 3,
|
||||
"80M" or "10M" => 2,
|
||||
null => 0,
|
||||
_ => 1,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user