When playing a word, forbid using a joker to specify a letter on the board (even a joker).

This is just a convention, but a reasonable one :)
This commit is contained in:
Olivier Teulière 2012-02-19 11:52:08 +01:00
parent 6e2c665bdf
commit 32957abfcc
3 changed files with 21 additions and 18 deletions

View file

@ -287,20 +287,13 @@ int Board::checkRoundAux(const Matrix<Tile> &iTilesMx,
t = iRound.getTile(i);
if (!iTilesMx[row][col + i].isEmpty())
{
// There is already a letter on the board
if (iTilesMx[row][col + i] != t)
// Using a joker tile to emulate the letter on the board is not allowed,
// the plain letter should be used instead.
// Also, make sure the played letter is the same as the one on the board
if (iRound.isJoker(i) || iTilesMx[row][col+i].toCode() != t.toCode())
{
// 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);
}
else
{
// Trying to overwrite a placed letter
return 2;
}
// Trying to overwrite a placed letter
return 2;
}
isolated = false;

View file

@ -26,8 +26,12 @@ a t
t ADEEPSS
j DEPASSE b12
a t
t W?
t WE?
j WuS i5
j JEUX H6
j JEUx H6
j Ex 9G
j EX 9G
a t
a g
q

View file

@ -72,11 +72,17 @@ commande> j DEPASSE b12
Mot incorrect ou mal placé (12)
commande> a t
ADEEPSS
commande> t W?
commande> t WE?
commande> j WuS i5
Mot incorrect ou mal placé (7)
commande> j JEUX H6
Mot incorrect ou mal placé (4)
commande> j JEUx H6
commande> j Ex 9G
Mot incorrect ou mal placé (6)
commande> j EX 9G
commande> a t
W?
W
commande> a g
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
A - - - - - - - - - - - - - - -
@ -85,8 +91,8 @@ commande> a g
D - - - - - - I - - - - - - - -
E - - - - - - E - - - - - - - -
F - - - - - - G - - - - - - - -
G - - - - - - E - - - - - - - -
H - - - - - J E U - - - - - - -
G - - - - - - E - E - - - - - -
H - - - - - J E U x - - - - - -
I - - - - - - S - - - - - - - -
J - - - - - - - - - - - - - - -
K - - - - - - - - - - - - - - -