diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2019-02-15 12:11:33 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2019-02-15 12:11:33 +0100 |
commit | e2279628e551e5c82f70c739f6c02671e6ccd9fd (patch) | |
tree | eda529e1b7e40c55d4d176ebc53ca41d58aad680 /main.cpp | |
parent | 6528e469f7e03252c58d2908203bdcc9a6d9ac83 (diff) |
Feature 'write_lines' -- UNTESTED!
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -296,11 +296,17 @@ static void playMatch(Player &p1, Player &p2, int index, const Params ¶ms) { 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); |