Skip to content

Commit

Permalink
Initial work on KS exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoerzen committed Aug 23, 2010
1 parent ddc8ed9 commit f9746ed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions 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.*;
Expand All @@ -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;

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -87,7 +87,7 @@ public boolean isComplete() {
}

public String getMultiplierField() {
if (state.equals("TX")) return county;
if (state.equals("KS")) return county;
return state;
}

Expand Down

0 comments on commit f9746ed

Please sign in to comment.