Skip to content

Commit 2f30b03

Browse files
skiminkiAloril
authored andcommitted
Send opponent rating in the UCI_Opponent string
1 parent 888023a commit 2f30b03

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

projects/lib/src/uciengine.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,11 @@ void UciEngine::startGame()
153153

154154
if (m_sendOpponentsName)
155155
{
156+
QString opRating = opponent()->rating() ?
157+
QString::number(opponent()->rating()) : "none";
156158
QString opType = opponent()->isHuman() ? "human" : "computer";
157-
QString value = QString("none none %1 %2")
158-
.arg(opType, opponent()->name());
159+
QString value = QString("none %1 %2 %3")
160+
.arg(opRating, opType, opponent()->name());
159161
sendOption("UCI_Opponent", value);
160162
}
161163

0 commit comments

Comments
 (0)