[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Eliot-dev] eliot/game training.cpp
From: |
eliot-dev |
Subject: |
[Eliot-dev] eliot/game training.cpp |
Date: |
Fri, 11 Aug 2006 22:15:13 +0000 |
CVSROOT: /cvsroot/eliot
Module name: eliot
Changes by: Antoine Fraboulet <afrab> 06/08/11 22:15:13
Modified files:
game : training.cpp
Log message:
- add debug strings
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/game/training.cpp?cvsroot=eliot&r1=1.16&r2=1.17
Patches:
Index: training.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/training.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- training.cpp 22 Jan 2006 12:23:53 -0000 1.16
+++ training.cpp 11 Aug 2006 22:15:13 -0000 1.17
@@ -103,21 +103,31 @@
{
/* Perform all the validity checks, and fill a round */
Round round;
+
int res = checkPlayedWord(iCoord, iWord, round);
if (res != 0)
{
+ debug("check returned with an error %d\n",res);
return res;
}
/* Update the rack and the score of the current player */
+ debug("play: %s %s %d\n",
+ convertToMb(round.getWord()).c_str(),
+ convertToMb(round.getCoord().toString()).c_str(),
+ round.getPoints());
+
m_players[m_currPlayer]->addPoints(round.getPoints());
+ // see game.cpp::helperPlayRound():99 comment
m_players[m_currPlayer]->endTurn(round, m_history.getSize());
/* Everything is OK, we can play the word */
- helperPlayRound(round);
+ if (helperPlayRound(round))
+ {
+ debug("play: error during play\n");
+ }
/* Next turn */
- // XXX: Should it be done by the interface instead?
endTurn();
return 0;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Eliot-dev] eliot/game training.cpp,
eliot-dev <=