summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/main.cpp b/main.cpp
index f2d0664..3dca757 100644
--- a/main.cpp
+++ b/main.cpp
@@ -287,18 +287,19 @@ static void playMatch(Player &p1, Player &p2, int index, const Params &params) {
}
if (referee.gameEnded()) {
+ mres.status = MatchResult::Status::ok;
+
+ optional<vector<int>> oscores = referee.getScores();
+ assert(oscores);
+ mres.sc1 = oscores->at(0);
+ mres.sc2 = oscores->at(1);
+
goto match_done;
}
}
}
match_done:
- optional<vector<int>> oscores = referee.getScores();
- assert(oscores);
- mres.status = MatchResult::Status::ok;
- mres.sc1 = oscores->at(0);
- mres.sc2 = oscores->at(1);
-
for (int i = 0; i < 2; i++) {
bool success = procs[i].writeLine("Stop");
procs[i].unStop();