From 856b55c8a601eb8e2fe9a1845f8b02fba20e2855 Mon Sep 17 00:00:00 2001 From: mrbesen Date: Tue, 15 Mar 2022 20:53:45 +0100 Subject: [PATCH] waiting for players --- src/bot.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/bot.cpp b/src/bot.cpp index 28580a3..fbe1483 100644 --- a/src/bot.cpp +++ b/src/bot.cpp @@ -144,6 +144,8 @@ std::string Bot::gameToMessage(const Game& g, std::vectoraddPlayer(info); } + // game not ready, just stop + if(!g->getPlayerB()) { + return g; + } + // read the next turn value char nextturn = msg.text.at(msg.text.size()-1); g->setNextTurn(nextturn == 'X');