From f9746ed29fb425cb5a18611fe8afb9bce5523cef Mon Sep 17 00:00:00 2001 From: John Goerzen Date: Mon, 23 Aug 2010 00:52:19 -0500 Subject: [PATCH] Initial work on KS exchange --- com/loukides/jl/contests/KSQPResExchange.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/com/loukides/jl/contests/KSQPResExchange.java b/com/loukides/jl/contests/KSQPResExchange.java index 6e12a44..1d802f9 100644 --- a/com/loukides/jl/contests/KSQPResExchange.java +++ b/com/loukides/jl/contests/KSQPResExchange.java @@ -1,4 +1,4 @@ -// exchange for the Texas QSO Party (TX residents) +// exchange for the Kansas QSO Party (KS residents) package com.loukides.jl.contests; import com.loukides.jl.jl.*; import com.loukides.jl.util.*; @@ -7,13 +7,13 @@ import java.io.*; import java.text.*; -public class TXQPResExchange extends AbstractExchange { +public class KSQPResExchange extends AbstractExchange { protected String report = ""; protected String county = ""; protected String state = ""; - protected static HashMap countyMap = new HashMap(87); + protected static HashMap countyMap = new HashMap(105); boolean sticky = false; @@ -51,8 +51,8 @@ else if (alphas == len && len == 2) { county = ""; } else if ( tok.equals("\'\'")) county = ""; - else if (alphas == len && (len == 3 || len == 4)) { - state = "TX"; + else if (alphas == len && (len == 3 || len == 4) && (! tok.equals("MAR"))) { + state = "KS"; county = tok; } // AT LEAST 2 alphas in a US callsign @@ -63,7 +63,7 @@ else if ( nums >= 1 && alphas >=2 ) { } // assign a report, if there isn't a mode-appropriate report already if ( (! (report.length() == 2)) && mode.equals("PH")) report = "59"; - else if ( (! (report.length() == 3)) && mode.equals("CW")) report = "599"; + else if ( (! (report.length() == 3)) && (mode.equals("CW") || mode.equals("RY"))) report = "599"; } // We need some way to create the "sent" half of the two-way @@ -87,7 +87,7 @@ public boolean isComplete() { } public String getMultiplierField() { - if (state.equals("TX")) return county; + if (state.equals("KS")) return county; return state; }