mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-01-18 10:26:15 +01:00
- bug correction for game::play when playing on a joker tile
This commit is contained in:
parent
6f00463fa1
commit
f9af9493d2
1 changed files with 17 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "rack.h"
|
||||
#include "results.h"
|
||||
#include "board.h"
|
||||
#include "debug.h"
|
||||
|
||||
#define oo 0
|
||||
#define __ 1
|
||||
|
@ -266,7 +267,22 @@ int Board::checkRoundAux(Matrix<Tile> &iTilesMx,
|
|||
{
|
||||
/* There is already a letter on the board */
|
||||
if (iTilesMx[row][col + i] != t)
|
||||
{
|
||||
/* check if it is only a joker */
|
||||
if ((iTilesMx[row][col+i].toCode() == t.toCode()) && iTilesMx[row][col+i].isJoker())
|
||||
{
|
||||
// do nothing, we don't need to change the tile in the round
|
||||
// iRound.setJoker(i,true);
|
||||
debug("load: play on joker for letter %d (%c)\n",i,iRound.getTile(i).toChar());
|
||||
}
|
||||
else
|
||||
{
|
||||
debug("load: overwriting tile %c with %c\n",
|
||||
iTilesMx[row][col+i].toChar(),
|
||||
t.toChar());
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
|
||||
isolated = false;
|
||||
iRound.setFromBoard(i);
|
||||
|
|
Loading…
Reference in a new issue