Skip to content

Commit bd60214

Browse files
skiminkiAloril
authored andcommitted
Add hook for recording game results
1 parent 0aa327e commit bd60214

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

projects/cli/src/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,7 @@ EngineMatch* parseMatch(const QStringList& args, CuteChessCoreApplication& app)
644644
for (p = pList.begin(); p != pList.end(); ++p) {
645645
QVariantMap pMap = p->toMap();
646646
addResumeScore(pMap["result"], pMap["white"], pMap["black"], &engineMap);
647+
tournament->addResumeGameResult(nextGame++, pMap["result"].toString());
647648
matchNum = matchNum + 1;
648649
if (pMap["result"] == "*") {
649650
pList.erase(p, pList.end());

projects/lib/src/tournament.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ void Tournament::setResume(int nextGameNumber)
365365
m_resumeGameNumber = nextGameNumber;
366366
}
367367

368+
void Tournament::addResumeGameResult(int gameNumber, const QString &result)
369+
{
370+
}
371+
368372
void Tournament::addPlayer(PlayerBuilder* builder,
369373
const TimeControl& timeControl,
370374
const OpeningBook* book,

projects/lib/src/tournament.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,11 @@ class LIB_EXPORT Tournament : public QObject
284284
*/
285285
void setResume(int nextGameNumber);
286286

287+
/*!
288+
* Add game result for a resumed tournament
289+
*/
290+
virtual void addResumeGameResult(int gameNumber, const QString &result);
291+
287292
/*!
288293
* Sets the tournament to Berger/Schurig scheduling if \a enabled.
289294
*/

0 commit comments

Comments
 (0)