Quellcode durchsuchen

fix: added a way for players to join game in receive function. <- this is the correct commit

wes vor 4 Jahren
Ursprung
Commit
38ff4872ae
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      Qwixx/game.cpp

+ 2 - 1
Qwixx/game.cpp

@@ -145,8 +145,9 @@ struct Turn Game::receive(std::string userInput)
         // add player to game
         addPlayer(userInput.substr(3));
         ScoreSheet lastPlayer = players.back();
-        // send player secret - for now it is only printed below
+        // send player secret -> for now it is only printed below
         fprintf(stdout, "Player %s has a secret of: %d",lastPlayer.savedName, lastPlayer.secretNumber);
+        return turnInProgress;
     }
     // look for the position of a comma in userInput
     for(int i = 0;i < userInput.size();i++)