eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] eliot/game game.cpp


From: eliot-dev
Subject: [Eliot-dev] eliot/game game.cpp
Date: Fri, 11 Aug 2006 22:13:02 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Antoine Fraboulet <afrab>       06/08/11 22:13:02

Modified files:
        game           : game.cpp 

Log message:
        - add debug strings

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/game/game.cpp?cvsroot=eliot&r1=1.30&r2=1.31

Patches:
Index: game.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/game.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- game.cpp    22 Jan 2006 20:48:17 -0000      1.30
+++ game.cpp    11 Aug 2006 22:13:02 -0000      1.31
@@ -78,6 +78,7 @@
     m_history.setCurrentRack(getCurrentPlayer().getLastRack());
     m_history.playRound(m_currPlayer, m_history.getSize(),  iRound);
 
+    debug("    helper: %d points\n",iRound.getPoints());
     m_points += iRound.getPoints();
 
     // Before updating the bag and the board, if we are playing a "joker game",
@@ -141,9 +142,11 @@
                 m_bag.takeTile(Tile::Joker());
             }
             else
+            {
                 m_bag.takeTile(iRound.getTile(i));
         }
     }
+    }
     m_board.addRound(*m_dic, iRound);
 
     return 0;
@@ -528,11 +531,16 @@
     oRound.init();
     oRound.accessCoord().setFromString(iCoord);
     if (!oRound.getCoord().isValid())
+    {
+        debug("game: incorrect coordinates\n");
         return 2;
+    }
 
     /* Check the existence of the word */
     if (Dic_search_word(*m_dic, iWord.c_str()) == 0)
+    {
         return 3;
+    }
 
     /* Set the word */
     // TODO: make this a Round_ function (Round_setwordfromchar for example)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]