[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] eliot/game board.cpp
From: |
eliot-dev |
Subject: |
[Eliot-dev] eliot/game board.cpp |
Date: |
Fri, 11 Aug 2006 22:12:11 +0000 |
CVSROOT: /cvsroot/eliot
Module name: eliot
Changes by: Antoine Fraboulet <afrab> 06/08/11 22:12:11
Modified files:
game : board.cpp
Log message:
- bug correction for game::play when playing on a joker tile
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/game/board.cpp?cvsroot=eliot&r1=1.13&r2=1.14
Patches:
Index: board.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/board.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- board.cpp 22 Jan 2006 12:23:53 -0000 1.13
+++ board.cpp 11 Aug 2006 22:12:10 -0000 1.14
@@ -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 @@
{
/* 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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Eliot-dev] eliot/game board.cpp,
eliot-dev <=