summaryrefslogtreecommitdiff
path: root/main.cpp
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-02-15 12:11:33 +0100
committerTom Smeding <tom.smeding@gmail.com>2019-02-15 12:11:33 +0100
commite2279628e551e5c82f70c739f6c02671e6ccd9fd (patch)
treeeda529e1b7e40c55d4d176ebc53ca41d58aad680 /main.cpp
parent6528e469f7e03252c58d2908203bdcc9a6d9ac83 (diff)
Feature 'write_lines' -- UNTESTED!
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 2d3f828..a4b47ed 100644
--- a/main.cpp
+++ b/main.cpp
@@ -296,11 +296,17 @@ static void playMatch(Player &p1, Player &p2, int index, const Params &params) {
throw StopCompetitionError();
}
+ for (const auto &p : referee.playerWriteLines()) {
+ assert(0 <= p.first && p.first < 2);
+ procs[p.first].writeLine(p.second);
+ }
+
if (referee.gameEnded()) {
mres.status = MatchResult::Status::ok;
optional<vector<int>> oscores = referee.getScores();
assert(oscores);
+ assert(oscores->size() == 2);
mres.sc1 = oscores->at(0);
mres.sc2 = oscores->at(1);