Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i_1003 Use CLICSScoreboard instead of ScoreboardJson #1004

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions src/edu/csus/ecs/pc2/core/report/ExportFilesUtilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@
import edu.csus.ecs.pc2.core.execute.ExecuteUtilities;
import edu.csus.ecs.pc2.core.imports.clics.CLICSAward;
import edu.csus.ecs.pc2.core.imports.clics.CLICSAwardUtilities;
import edu.csus.ecs.pc2.core.imports.clics.CLICSScoreboard;
import edu.csus.ecs.pc2.core.log.StaticLog;
import edu.csus.ecs.pc2.core.model.IInternalContest;
import edu.csus.ecs.pc2.core.standings.ContestStandings;
import edu.csus.ecs.pc2.core.standings.ScoreboardUtilities;
import edu.csus.ecs.pc2.exports.ccs.ResultsFile;
import edu.csus.ecs.pc2.services.core.EventFeedJSON;
import edu.csus.ecs.pc2.services.core.ScoreboardJson;

public class ExportFilesUtilities {

Expand Down Expand Up @@ -61,13 +63,13 @@ public static String[] writeResultsFiles(IInternalContest contest, String output
}

try {
ScoreboardJson scoreboardJson = new ScoreboardJson();
String json = scoreboardJson.createJSON(contest);
String[] scoreboardJsonLines = { json };
FileUtilities.writeFileContents(scoreboardJsonFilename, scoreboardJsonLines);
ContestStandings contestStandings = ScoreboardUtilities.createContestStandings(contest);
CLICSScoreboard clicsScoreboard = new CLICSScoreboard(contestStandings);
String json = clicsScoreboard.toString();
String[] sa = { json };
FileUtilities.writeFileContents(scoreboardJsonFilename, sa);

filesCreated.add(scoreboardJsonFilename);

} catch (Exception e) {
StaticLog.getLog().log(Level.WARNING, "Problem writing scorebord file", e);
Utilities.printStackTrace(System.out, e);
Expand Down
Loading