Read the rest of what a .udc file says, and score what N1MM scores
Two pieces of work on the scoring engine. The .udc reader now takes N1MM's published scoring vocabulary: the full PointsPerContact condition set, the PointsMultBy family, PowerMult, BonusPoints, the multiplier sources and the settings that say which stations bring a multiplier in. MultMult is a weight rather than a switch, as in N1MM's ComputeScore. The entry categories and the sent exchange reach the rules in a new ContestEntry, so a contest can score by the power category it is entered in or by what this station sends. Then every contest in a real N1MM log was scored again from these rules and compared with the points and multiplier flags N1MM wrote. That found five bugs: ARRL DX and IARU read the exchange from the wrong column, a stored " " was read as a value rather than as empty, CQ WW RTTY's own Canadian area names were not counted, a maritime mobile scored nothing, and a contact in a mode the contest does not run scored as if it were in the contest. docs/n1mm-interop.md has the check and what still differs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
@@ -90,4 +90,24 @@ public class CqWorldWideRttyTests
|
||||
Assert.Equal(ExchangeSlot.Section, fields[2].Slot);
|
||||
Assert.False(fields[2].IsRequired);
|
||||
}
|
||||
|
||||
/// The Canadian areas this contest counts are its own list, which splits
|
||||
/// Newfoundland from Labrador.
|
||||
[Theory]
|
||||
[InlineData("NF")]
|
||||
[InlineData("LB")]
|
||||
public void TheContestsOwnCanadianAreasCount(string area) =>
|
||||
Assert.Contains(
|
||||
LogFor(TestLog.Germany).Judge(Contact("VO1XYZ", 5, area)).NewMultipliers,
|
||||
m => m.Index == 3 && m.Value == area);
|
||||
|
||||
/// A maritime mobile station belongs to no country. CQ WW counts it for the
|
||||
/// zone alone, and the contact still scores by continent.
|
||||
[Fact]
|
||||
public void MaritimeMobileScoresButBringsNoCountry()
|
||||
{
|
||||
Verdict verdict = LogFor(TestLog.Germany).Judge(Contact("IK2XYZ/MM", 15));
|
||||
Assert.Equal(2, verdict.Points);
|
||||
Assert.DoesNotContain(verdict.NewMultipliers, m => m.Index == 2);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user