mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-01-18 10:26:15 +01:00
Always consider that the played move was played by the first player.
Knowing the actual player is not always possible, since potentially none of the players has found the played move (for example in arbitration mode). This ID is now only used to retrieve the rack from which the move was formed, so any player ID will do. The non-regression tests have been adapted accordingly.
This commit is contained in:
parent
fbb34d795c
commit
e327d4605d
5 changed files with 22 additions and 22 deletions
|
@ -266,20 +266,20 @@ void Duplicate::endTurn()
|
|||
}
|
||||
|
||||
// Play the best word on the board
|
||||
Command *pCmd = new GameMoveCmd(*this, bestMove, bestPlayer->getId());
|
||||
// We assign it to player 0 arbitrarily (this is only used
|
||||
// to retrieve the rack, which is the same for all players...)
|
||||
static const unsigned int REF_PLAYER_ID = 0;
|
||||
Command *pCmd = new GameMoveCmd(*this, bestMove, REF_PLAYER_ID);
|
||||
accessNavigation().addAndExecute(pCmd);
|
||||
|
||||
// Leave the same reliquate to all players
|
||||
// This is required by the start() method which will be called to
|
||||
// start the next turn
|
||||
const PlayedRack& pld = bestPlayer->getCurrentRack();
|
||||
const PlayedRack& pld = getHistory().getCurrentRack();
|
||||
BOOST_FOREACH(Player *player, m_players)
|
||||
{
|
||||
if (player != bestPlayer)
|
||||
{
|
||||
Command *pCmd = new PlayerRackCmd(*player, pld);
|
||||
accessNavigation().addAndExecute(pCmd);
|
||||
}
|
||||
Command *pCmd = new PlayerRackCmd(*player, pld);
|
||||
accessNavigation().addAndExecute(pCmd);
|
||||
}
|
||||
|
||||
// Start next turn...
|
||||
|
|
|
@ -61,8 +61,8 @@ Game: mode=Duplicate
|
|||
Game: history:
|
||||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 2 | ATOYDSI | OYATS | H4 | 30 |
|
||||
2 | 2 | DI+AEINS | DENIAISA | 6A | 63 | *
|
||||
1 | 0 | ATOYDSI | OYATS | H4 | 30 |
|
||||
2 | 0 | DI+AEINS | DENIAISA | 6A | 63 | *
|
||||
3 | 0 | P?RBFEG | FRaYE | 5E | 45 |
|
||||
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ Game: variant=joker
|
|||
Game: history:
|
||||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 1 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
1 | 0 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
|
||||
|
||||
Rack 0: Z+IL?ENT
|
||||
|
@ -71,7 +71,7 @@ Game: variant=joker
|
|||
Game: history:
|
||||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 1 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
1 | 0 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
2 | 0 | Z+IL?ENT | pLANTIEZ | 3F | 86 | *
|
||||
|
||||
|
||||
|
@ -107,7 +107,7 @@ Game: variant=joker
|
|||
Game: history:
|
||||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 1 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
1 | 0 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
2 | 0 | Z+IL?ENT | pLANTIEZ | 3F | 86 | *
|
||||
3 | 0 | DEDOTC? | DECODaT | G5 | 79 | *
|
||||
|
||||
|
@ -144,10 +144,10 @@ Game: variant=joker
|
|||
Game: history:
|
||||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 1 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
1 | 0 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
2 | 0 | Z+IL?ENT | pLANTIEZ | 3F | 86 | *
|
||||
3 | 0 | DEDOTC? | DECODaT | G5 | 79 | *
|
||||
4 | 1 | RABEGE? | hEBERGEA | L2 | 72 | *
|
||||
4 | 0 | RABEGE? | hEBERGEA | L2 | 72 | *
|
||||
|
||||
|
||||
Rack 0: X?MFETR
|
||||
|
@ -179,7 +179,7 @@ Game: variant=joker
|
|||
Game: history:
|
||||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 1 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
1 | 0 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
2 | 0 | Z+IL?ENT | pLANTIEZ | 3F | 86 | *
|
||||
3 | 0 | DEDOTC? | DECODaT | G5 | 79 | *
|
||||
|
||||
|
@ -213,7 +213,7 @@ Game: variant=joker
|
|||
Game: history:
|
||||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 1 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
1 | 0 | AK?EZEN | AKENEs | H3 | 48 |
|
||||
2 | 0 | Z+IL?ENT | pLANTIEZ | 3F | 86 | *
|
||||
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ Game: history:
|
|||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 0 | IMEJVSL | VIMES | H4 | 26 |
|
||||
2 | 1 | JL+NHAYG | JAN | G7 | 38 |
|
||||
2 | 0 | JL+NHAYG | JAN | G7 | 38 |
|
||||
|
||||
|
||||
Rack 0: GHLY+ELA
|
||||
|
@ -301,7 +301,7 @@ Game: history:
|
|||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 0 | IMEJVSL | VIMES | H4 | 26 |
|
||||
2 | 1 | JL+NHAYG | JAN | G7 | 38 |
|
||||
2 | 0 | JL+NHAYG | JAN | G7 | 38 |
|
||||
|
||||
|
||||
Rack 0: EGHLL
|
||||
|
@ -404,7 +404,7 @@ Game: history:
|
|||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 0 | IMEJVSL | VIMES | H4 | 26 |
|
||||
2 | 1 | JL+NHAYG | JAN | G7 | 38 |
|
||||
2 | 0 | JL+NHAYG | JAN | G7 | 38 |
|
||||
|
||||
|
||||
Rack 0: EGHLL
|
||||
|
@ -438,7 +438,7 @@ Game: history:
|
|||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 0 | IMEJVSL | VIMES | H4 | 26 |
|
||||
2 | 1 | JL+NHAYG | JAN | G7 | 38 |
|
||||
2 | 0 | JL+NHAYG | JAN | G7 | 38 |
|
||||
|
||||
|
||||
Rack 0: GHLY+ELA
|
||||
|
@ -541,7 +541,7 @@ Game: history:
|
|||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 0 | IMEJVSL | VIMES | H4 | 26 |
|
||||
2 | 1 | JL+NHAYG | JAN | G7 | 38 |
|
||||
2 | 0 | JL+NHAYG | JAN | G7 | 38 |
|
||||
|
||||
|
||||
Rack 0: GHLY+ITA
|
||||
|
|
|
@ -20,7 +20,7 @@ Game: mode=Duplicate
|
|||
Game: history:
|
||||
N | P | RACK | SOLUTION | REF | PTS | BONUS
|
||||
===|===|==========|================|=====|=====|======
|
||||
1 | 1 | ATNE??A | ay | H8 | 0 |
|
||||
1 | 0 | ATNE??A | ay | H8 | 0 |
|
||||
|
||||
|
||||
Rack 0: AAENT+UL
|
||||
|
|
Loading…
Reference in a new issue