eliot-dev
[Top][All Lists]
Advanced

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

[Eliot-dev] eliot/game duplicate.cpp duplicate.h freegame.c...


From: Olivier Teulière
Subject: [Eliot-dev] eliot/game duplicate.cpp duplicate.h freegame.c...
Date: Sun, 23 Nov 2008 17:04:40 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>      08/11/23 17:04:40

Modified files:
        game           : duplicate.cpp duplicate.h freegame.cpp 
                         freegame.h game.h training.cpp training.h 

Log message:
        Removed the useless return value of Game::start()

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/game/duplicate.cpp?cvsroot=eliot&r1=1.24&r2=1.25
http://cvs.savannah.gnu.org/viewcvs/eliot/game/duplicate.h?cvsroot=eliot&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/eliot/game/freegame.cpp?cvsroot=eliot&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/eliot/game/freegame.h?cvsroot=eliot&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/eliot/game/game.h?cvsroot=eliot&r1=1.41&r2=1.42
http://cvs.savannah.gnu.org/viewcvs/eliot/game/training.cpp?cvsroot=eliot&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/eliot/game/training.h?cvsroot=eliot&r1=1.19&r2=1.20

Patches:
Index: duplicate.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/duplicate.cpp,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -b -r1.24 -r1.25
--- duplicate.cpp       23 Nov 2008 17:03:29 -0000      1.24
+++ duplicate.cpp       23 Nov 2008 17:04:40 -0000      1.25
@@ -96,7 +96,7 @@
 }
 
 
-int Duplicate::start()
+void Duplicate::start()
 {
     ASSERT(getNPlayers(), "Cannot start a game without any player");
 
@@ -120,14 +120,12 @@
     catch (EndGameException &e)
     {
         endGame();
-        return 1;
+        return;
     }
 
     // Little hack to handle duplicate games with only AI players.
     // This will have no effect when there is at least one human player
     tryEndTurn();
-
-    return 0;
 }
 
 

Index: duplicate.h
===================================================================
RCS file: /cvsroot/eliot/eliot/game/duplicate.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- duplicate.h 23 Nov 2008 08:18:06 -0000      1.16
+++ duplicate.h 23 Nov 2008 17:04:40 -0000      1.17
@@ -67,7 +67,7 @@
      * Pre-requisite: all the players must have the same rack when this
      * method is called
      */
-    virtual int start();
+    virtual void start();
 
     /**
      * See description of Game::play() for the possible return values.

Index: freegame.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/freegame.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- freegame.cpp        23 Nov 2008 16:58:31 -0000      1.26
+++ freegame.cpp        23 Nov 2008 17:04:40 -0000      1.27
@@ -113,7 +113,7 @@
 }
 
 
-int FreeGame::start()
+void FreeGame::start()
 {
     ASSERT(getNPlayers(), "Cannot start a game without any player");
 
@@ -133,8 +133,6 @@
     {
         playAI(m_currPlayer);
     }
-
-    return 0;
 }
 
 

Index: freegame.h
===================================================================
RCS file: /cvsroot/eliot/eliot/game/freegame.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- freegame.h  23 Nov 2008 08:18:06 -0000      1.14
+++ freegame.h  23 Nov 2008 17:04:40 -0000      1.15
@@ -53,10 +53,8 @@
      *************************/
     /**
      * Start the game.
-     * Possible return values:
-     *  0: everything went fine
      */
-    virtual int start();
+    virtual void start();
 
     /**
      * See description of Game::play() for the possible return values.

Index: game.h
===================================================================
RCS file: /cvsroot/eliot/eliot/game/game.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -b -r1.41 -r1.42
--- game.h      23 Nov 2008 16:58:31 -0000      1.41
+++ game.h      23 Nov 2008 17:04:40 -0000      1.42
@@ -142,7 +142,7 @@
      * AI players are handled automatically, so if the game only has AI
      * players, it will play until the end.
      */
-    virtual int start() = 0;
+    virtual void start() = 0;
 
     /**
      * Method used by human players to play the word iWord at coordinates

Index: training.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/training.cpp,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- training.cpp        23 Nov 2008 16:55:29 -0000      1.26
+++ training.cpp        23 Nov 2008 17:04:40 -0000      1.27
@@ -134,13 +134,12 @@
 }
 
 
-int Training::start()
+void Training::start()
 {
     if (getNPlayers() != 0)
-        return 1;
+        return;
 
     m_currPlayer = 0;
-    return 0;
 }
 
 

Index: training.h
===================================================================
RCS file: /cvsroot/eliot/eliot/game/training.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- training.h  23 Nov 2008 08:18:10 -0000      1.19
+++ training.h  23 Nov 2008 17:04:40 -0000      1.20
@@ -52,7 +52,7 @@
     /*************************
      * Game handling
      *************************/
-    virtual int start();
+    virtual void start();
 
     /// See description of Game::play()
     virtual int play(const wstring &iCoord, const wstring &iWord);




reply via email to

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