diff --git a/game/duplicate.cpp b/game/duplicate.cpp index 1e910fb..6c071bc 100644 --- a/game/duplicate.cpp +++ b/game/duplicate.cpp @@ -429,7 +429,7 @@ void Duplicate::setGameAndPlayersRack(const PlayedRack &iRack) // and solos should be assigned. BOOST_FOREACH(Player *player, m_players) { - Command *pCmd = new PlayerMoveCmd(*player, Move(), true); + Command *pCmd = new PlayerMoveCmd(*player, Move()); accessNavigation().addAndExecute(pCmd); } } diff --git a/game/xml_reader.cpp b/game/xml_reader.cpp index ce4c775..55e365e 100644 --- a/game/xml_reader.cpp +++ b/game/xml_reader.cpp @@ -398,9 +398,12 @@ void XmlReader::endElement(const string& namespaceURI, else if (tag == "PlayerMove") { + // FIXME: this is game-related logic. It should not be done here. + bool isArbitrationGame = m_game->getParams().getMode() == GameParams::kARBITRATION; + const Move &move = buildMove(*m_game, m_attributes, /*XXX:true*/false); Player &p = getPlayer(m_players, m_attributes["playerId"], tag); - PlayerMoveCmd *cmd = new PlayerMoveCmd(p, move); + PlayerMoveCmd *cmd = new PlayerMoveCmd(p, move, isArbitrationGame); m_game->accessNavigation().addAndExecute(cmd); } diff --git a/test/arbitration/load_save.ref b/test/arbitration/load_save.ref index 0539ec0..d359814 100644 --- a/test/arbitration/load_save.ref +++ b/test/arbitration/load_save.ref @@ -169,10 +169,10 @@ Game: history: 1 | 0 | CHARITO | CHARIOT | H3 | 82 | * -Rack 0: LAERSIU -Rack 1: LAERSIU -Score 0: 80 -Score 1: 82 +Rack 0: +Rack 1: +Score 0: 154 +Score 1: 156 commande> h n commande> t TEEEPMO commande> m ESTOMPEE O3