eliot-dev
[Top][All Lists]
Advanced

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

[Eliot-dev] eliot game/game.cpp game/game.h game/navigation...


From: Olivier Teulière
Subject: [Eliot-dev] eliot game/game.cpp game/game.h game/navigation...
Date: Sat, 24 Jan 2009 10:28:23 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>       09/01/24 10:28:23

Modified files:
        game           : game.cpp game.h navigation.cpp public_game.cpp 
                         public_game.h training.cpp training.h 
        qt             : training_widget.cpp 
        test           : driver load_saved_game.input 
                         load_saved_game.ref training_cross2.input 
                         training_cross2.ref training_cross3.input 
                         training_cross3.ref training_joker2.input 
                         training_joker2.ref 
        utils          : eliottxt.cpp ncurses.cpp 
Added files:
        test           : duplicate_navigation.input 
                         duplicate_navigation.ref 
                         freegame_navigation.input 
                         freegame_navigation.ref 
                         training_navigation.input 
                         training_navigation.ref 
Removed files:
        test           : training_back.input training_back.ref 

Log message:
         - Setting the rack manually is now done via a command, and can thus be 
undone
         - Added non-regression tests for the navigation in the game history 
(all modes), and removed a less useful test

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/game/game.cpp?cvsroot=eliot&r1=1.53&r2=1.54
http://cvs.savannah.gnu.org/viewcvs/eliot/game/game.h?cvsroot=eliot&r1=1.47&r2=1.48
http://cvs.savannah.gnu.org/viewcvs/eliot/game/navigation.cpp?cvsroot=eliot&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/eliot/game/public_game.cpp?cvsroot=eliot&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/eliot/game/public_game.h?cvsroot=eliot&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/eliot/game/training.cpp?cvsroot=eliot&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/eliot/game/training.h?cvsroot=eliot&r1=1.23&r2=1.24
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/training_widget.cpp?cvsroot=eliot&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/eliot/test/driver?cvsroot=eliot&r1=1.12&r2=1.13
http://cvs.savannah.gnu.org/viewcvs/eliot/test/load_saved_game.input?cvsroot=eliot&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/eliot/test/load_saved_game.ref?cvsroot=eliot&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_cross2.input?cvsroot=eliot&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_cross2.ref?cvsroot=eliot&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_cross3.input?cvsroot=eliot&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_cross3.ref?cvsroot=eliot&r1=1.4&r2=1.5
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_joker2.input?cvsroot=eliot&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_joker2.ref?cvsroot=eliot&r1=1.6&r2=1.7
http://cvs.savannah.gnu.org/viewcvs/eliot/test/duplicate_navigation.input?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/test/duplicate_navigation.ref?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/test/freegame_navigation.input?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/test/freegame_navigation.ref?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_navigation.input?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_navigation.ref?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_back.input?cvsroot=eliot&r1=1.4&r2=0
http://cvs.savannah.gnu.org/viewcvs/eliot/test/training_back.ref?cvsroot=eliot&r1=1.9&r2=0
http://cvs.savannah.gnu.org/viewcvs/eliot/utils/eliottxt.cpp?cvsroot=eliot&r1=1.31&r2=1.32
http://cvs.savannah.gnu.org/viewcvs/eliot/utils/ncurses.cpp?cvsroot=eliot&r1=1.30&r2=1.31

Patches:
Index: game/game.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/game.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- game/game.cpp       22 Jan 2009 18:30:28 -0000      1.53
+++ game/game.cpp       24 Jan 2009 10:28:20 -0000      1.54
@@ -170,7 +170,7 @@
     }
     else
     {
-        throw GameException("Not a random mode");
+        throw GameException(_("Not a random mode"));
     }
 
     // Get the tiles remaining on the rack
@@ -403,12 +403,10 @@
 }
 
 
-int Game::helperSetRackManual(unsigned int p, bool iCheck, const wstring 
&iLetters)
+PlayedRack Game::helperSetRackManual(bool iCheck, const wstring &iLetters) 
const
 {
-    ASSERT(p < getNPlayers(), "Wrong player number");
-
     if (!m_dic.validateLetters(iLetters, L"+-"))
-        return 3;
+        throw GameException(_("Some letters are invalid for the current 
dictionary"));
 
     PlayedRack pld;
     pld.setManual(iLetters);
@@ -417,7 +415,7 @@
     pld.getRack(rack);
     if (!rackInBag(rack, m_bag))
     {
-        return 1;
+        throw GameException(_("The bag does not contain all these letters"));
     }
 
     if (iCheck)
@@ -430,13 +428,10 @@
             min = 1;
         if (!pld.checkRack(min, min))
         {
-            return 2;
+            throw GameException(_("Not enough vowels or consonants in this 
rack"));
         }
     }
-
-    m_players[p]->setCurrentRack(pld);
-
-    return 0;
+    return pld;
 }
 
 /*********************************************************

Index: game/game.h
===================================================================
RCS file: /cvsroot/eliot/eliot/game/game.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -b -r1.47 -r1.48
--- game/game.h 14 Jan 2009 21:53:38 -0000      1.47
+++ game/game.h 24 Jan 2009 10:28:20 -0000      1.48
@@ -296,13 +296,10 @@
                                    bool iCheck, set_rack_mode mode) const;
 
     /**
-     * Set the rack for the player p with the given letters
-     * Possible return values:
-     *  0: everything went fine
-     *  1: the bag doesn't have the wanted letters
-     *  2: the rack was checked for vowels/consonants and was not correct
+     * Return a rack for the given letters, after performing some checks.
+     * The '+' and '-' signs are accepted in the letters but ignored.
      */
-    int helperSetRackManual(unsigned int p, bool iCheck, const wstring 
&iLetters);
+    PlayedRack helperSetRackManual(bool iCheck, const wstring &iLetters) const;
 
     void firstPlayer();
     void prevPlayer();

Index: game/navigation.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/navigation.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- game/navigation.cpp 30 Nov 2008 21:08:29 -0000      1.7
+++ game/navigation.cpp 24 Jan 2009 10:28:20 -0000      1.8
@@ -23,6 +23,7 @@
 
 #include "navigation.h"
 #include "turn_cmd.h"
+#include "game_exception.h"
 #include "debug.h"
 #include "encoding.h"
 
@@ -53,9 +54,11 @@
 
 void Navigation::addAndExecute(Command *iCmd)
 {
-    ASSERT(isLastTurn(), "Trying to add a command to an old turn!");
-    ASSERT(m_currTurn >= 1, "Bug in the turns vector");
-    ASSERT(m_currTurn - 1 < m_turnCommands.size(), "Bug in the turns vector");
+    if (!isLastTurn())
+        throw GameException("Cannot add a command to an old turn");
+
+    ASSERT(m_currTurn >= 1, "Bug in the turns vector (1)");
+    ASSERT(m_currTurn - 1 < m_turnCommands.size(), "Bug in the turns vector 
(2)");
     m_turnCommands[m_currTurn - 1]->addAndExecute(iCmd);
 }
 

Index: game/public_game.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/public_game.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- game/public_game.cpp        14 Jan 2009 21:53:38 -0000      1.2
+++ game/public_game.cpp        24 Jan 2009 10:28:21 -0000      1.3
@@ -190,9 +190,9 @@
 }
 
 
-int PublicGame::trainingSetRackManual(bool iCheck, const wstring &iLetters)
+void PublicGame::trainingSetRackManual(bool iCheck, const wstring &iLetters)
 {
-    return getTrainingGame(m_game).setRackManual(iCheck, iLetters);
+    getTrainingGame(m_game).setRackManual(iCheck, iLetters);
 }
 
 

Index: game/public_game.h
===================================================================
RCS file: /cvsroot/eliot/eliot/game/public_game.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- game/public_game.h  14 Jan 2009 21:53:38 -0000      1.2
+++ game/public_game.h  24 Jan 2009 10:28:21 -0000      1.3
@@ -25,16 +25,6 @@
 #include <string>
 
 class Game;
-#if 0
-#include <vector>
-#include <iostream>
-#include "bag.h"
-#include "board.h"
-#include "history.h"
-#include "navigation.h"
-#include "command.h"
-#endif
-
 class Dictionary;
 class Bag;
 class Board;
@@ -200,7 +190,7 @@
      */
     void trainingSetRackRandom(bool iCheck, RackMode iRackMode);
 
-    int trainingSetRackManual(bool iCheck, const wstring &iLetters);
+    void trainingSetRackManual(bool iCheck, const wstring &iLetters);
 
     /// Place a temporary word on the board for preview purposes
     void trainingTestPlay(unsigned int iResultIndex);

Index: game/training.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/game/training.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- game/training.cpp   22 Jan 2009 18:30:31 -0000      1.31
+++ game/training.cpp   24 Jan 2009 10:28:21 -0000      1.32
@@ -65,7 +65,7 @@
 }
 
 
-int Training::setRackManual(bool iCheck, const wstring &iLetters)
+void Training::setRackManual(bool iCheck, const wstring &iLetters)
 {
     // Letters can be lowercase or uppercase as they are
     // coming from user input. We do not consider a lowercase
@@ -74,14 +74,12 @@
     wstring upperLetters = iLetters;
     std::transform(upperLetters.begin(), upperLetters.end(),
                    upperLetters.begin(), towupper);
-    int res = helperSetRackManual(m_currPlayer, iCheck, upperLetters);
-    // 0: ok
-    // 1: not enough tiles
-    // 2: check failed (number of vowels before round 15)
-    // 3: letters not in the dictionary
-    if (res == 0)
+    const PlayedRack &newRack = helperSetRackManual(iCheck, upperLetters);
+    Command *pCmd = new PlayerRackCmd(*m_players[m_currPlayer], newRack);
+    pCmd->setAutoExecution(false);
+    accessNavigation().addAndExecute(pCmd);
+    // Clear the results if everything went well
         m_results.clear();
-    return res;
 }
 
 

Index: game/training.h
===================================================================
RCS file: /cvsroot/eliot/eliot/game/training.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- game/training.h     22 Jan 2009 18:30:31 -0000      1.23
+++ game/training.h     24 Jan 2009 10:28:21 -0000      1.24
@@ -68,7 +68,12 @@
      */
     void setRackRandom(bool iCheck, set_rack_mode iRackMode);
 
-    int setRackManual(bool iCheck, const wstring &iLetters);
+    /**
+     * Set the rack with the given letters
+     * @exception EndGameException if the game is over
+     * @exception GameException if any other error occurs
+     */
+    void setRackManual(bool iCheck, const wstring &iLetters);
 
     /*************************
      * Override the default behaviour of addPlayer(), because in training

Index: qt/training_widget.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/training_widget.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- qt/training_widget.cpp      14 Dec 2008 13:20:49 -0000      1.8
+++ qt/training_widget.cpp      24 Jan 2009 10:28:21 -0000      1.9
@@ -195,15 +195,18 @@
 void TrainingWidget::on_lineEditRack_textEdited(const QString &iText)
 {
     // FIXME: first parameter is hardcoded
-    int res = m_game->trainingSetRackManual(false, qtw(iText));
-    if (res == 0)
+    m_game->trainingRemoveTestPlay();
+    try
     {
+        m_game->trainingSetRackManual(false, qtw(iText));
         pushButtonSearch->setEnabled(m_model->rowCount() == 0 &&
                                      lineEditRack->text() != "");
         emit gameUpdated();
     }
-    else
+    catch (GameException &e)
+    {
         emit notifyProblem(_q("Warning: Cannot set the rack to 
'%1'").arg(iText));
+    }
 }
 
 

Index: test/driver
===================================================================
RCS file: /cvsroot/eliot/eliot/test/driver,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- test/driver 23 Nov 2008 18:56:49 -0000      1.12
+++ test/driver 24 Jan 2009 10:28:21 -0000      1.13
@@ -28,10 +28,10 @@
 training_7pl1       0  # randseed unused
 # Several ways of getting a rack and playing a word
 training_play       0  # randseed unused
-# Training rack+search+play+back
-training_back       0  # randseed unused
 # Joker problem on game search
 training_rosace     0
+# Navigation in the game history
+training_navigation 0
 
 # Board cross off by one score
 training_cross      0
@@ -63,6 +63,8 @@
 duplicate_invalid_turn 9
 # Turn where the only valid move has 0 point
 duplicate_no_point 68 # For 2 jokers in the rack
+# Navigation in the game history
+duplicate_navigation 11
 
 #################
 # Free game mode
@@ -76,6 +78,8 @@
 freegame_change     3
 # Three AI players
 freegame_3_ai       2
+# Navigation in the game history
+freegame_navigation 10
 
 ##############
 # Load / Save

Index: test/load_saved_game.input
===================================================================
RCS file: /cvsroot/eliot/eliot/test/load_saved_game.input,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- test/load_saved_game.input  3 Mar 2008 22:13:59 -0000       1.3
+++ test/load_saved_game.input  24 Jan 2009 10:28:21 -0000      1.4
@@ -3,10 +3,6 @@
 j FABAcEE H4
 
 t LMUAEYE
-j YEBLE 6F
-a g
-
-n -1
 j AY I6
 
 t EELMUJE

Index: test/load_saved_game.ref
===================================================================
RCS file: /cvsroot/eliot/eliot/test/load_saved_game.ref,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- test/load_saved_game.ref    23 Nov 2008 08:33:17 -0000      1.5
+++ test/load_saved_game.ref    24 Jan 2009 10:28:21 -0000      1.6
@@ -7,26 +7,6 @@
 commande> j FABAcEE H4
 commande> 
 commande> t LMUAEYE
-commande> j YEBLE 6F
-commande> a g
-     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
- A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- F   -  -  -  -  -  Y  -  -  -  -  -  -  -  -  -
- G   -  -  -  -  -  E  -  -  -  -  -  -  -  -  -
- H   -  -  -  F  A  B  A  c  E  E  -  -  -  -  -
- I   -  -  -  -  -  L  -  -  -  -  -  -  -  -  -
- J   -  -  -  -  -  E  -  -  -  -  -  -  -  -  -
- K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
-commande> 
-commande> n -1
 commande> j AY I6
 commande> 
 commande> t EELMUJE

Index: test/training_cross2.input
===================================================================
RCS file: /cvsroot/eliot/eliot/test/training_cross2.input,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/training_cross2.input  5 Nov 2006 13:34:27 -0000       1.1
+++ test/training_cross2.input  24 Jan 2009 10:28:22 -0000      1.2
@@ -12,7 +12,5 @@
 n -1
 a g
 a gd
-r
-a r
 q
 q

Index: test/training_cross2.ref
===================================================================
RCS file: /cvsroot/eliot/eliot/test/training_cross2.ref,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- test/training_cross2.ref    23 Nov 2008 08:33:17 -0000      1.6
+++ test/training_cross2.ref    24 Jan 2009 10:28:22 -0000      1.7
@@ -155,18 +155,6 @@
  Mc 
[ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1]
  Nc 
[ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1]
  Oc 
[ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1]
-commande> r
-commande> a r
-  1: FUMEE              26 H4
-  2: FOUEE              24 H4
-  3: FOUIE              24 H4
-  4: MEFIE              22 H4
-  5: FUMEE              20 H8
-  6: MEFIE              20 H8
-  7: FOUEE              18 H8
-  8: FOUIE              18 H8
-  9: FUMEE              18 H5
- 10: FUMEE              18 H6
 commande> q
 fin du mode entraînement
 commande> q

Index: test/training_cross3.input
===================================================================
RCS file: /cvsroot/eliot/eliot/test/training_cross3.input,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/training_cross3.input  5 Nov 2006 13:34:27 -0000       1.1
+++ test/training_cross3.input  24 Jan 2009 10:28:22 -0000      1.2
@@ -9,6 +9,7 @@
 n -1
 a gd         # c3
 
+t EUOFMIE
 r
 n 1
 a gd         # c4

Index: test/training_cross3.ref
===================================================================
RCS file: /cvsroot/eliot/eliot/test/training_cross3.ref,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- test/training_cross3.ref    23 Nov 2008 08:33:17 -0000      1.4
+++ test/training_cross3.ref    24 Jan 2009 10:28:22 -0000      1.5
@@ -106,6 +106,7 @@
  Nc 
[ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1]
  Oc 
[ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1]
 commande> 
+commande> t EUOFMIE
 commande> r
 commande> n 1
 commande> a gd         # c4

Index: test/training_joker2.input
===================================================================
RCS file: /cvsroot/eliot/eliot/test/training_joker2.input,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- test/training_joker2.input  5 Nov 2006 13:34:27 -0000       1.1
+++ test/training_joker2.input  24 Jan 2009 10:28:22 -0000      1.2
@@ -5,6 +5,8 @@
 a l
 a g
 a gd # j1
+h r
+t NUUS?GE
 r
 a r
 q

Index: test/training_joker2.ref
===================================================================
RCS file: /cvsroot/eliot/eliot/test/training_joker2.ref,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- test/training_joker2.ref    23 Nov 2008 08:33:17 -0000      1.6
+++ test/training_joker2.ref    24 Jan 2009 10:28:22 -0000      1.7
@@ -19,7 +19,7 @@
 
    total                         467
 commande> a t
-NUUS?GE
+NUU
 commande> a l
  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z ?
  5 1 1 2 9 2 2 0 4 0 1 4 1 5 3 0 1 3 3 3 4 1 0 1 0 1 1
@@ -72,6 +72,8 @@
  Mc 
[ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][00000144:
 2][00000000:-1][00000000:-1][00080220: 2][ffffffff:-1]
  Nc 
[ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][010d714e:
 1][00000000:-1][00005040: 1][ffffffff:-1][ffffffff:-1]
  Oc 
[ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][ffffffff:-1][00000000:15][00000000:-1][00000000:-1][00000000:-1][00000000:-1]
+commande> h r
+commande> t NUUS?GE
 commande> r
 commande> a r
   1: SaUGRENU        *  82 E4

Index: utils/eliottxt.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/utils/eliottxt.cpp,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- utils/eliottxt.cpp  15 Jan 2009 20:55:57 -0000      1.31
+++ utils/eliottxt.cpp  24 Jan 2009 10:28:22 -0000      1.32
@@ -238,7 +238,7 @@
     printf("  n [] : jouer le résultat numéro []\n");
     printf("  r    : rechercher les meilleurs résultats\n");
     printf("  s [] : sauver la partie en cours dans le fichier []\n");
-    printf("  h [p|n|f|l] : naviguer dans l'historique (prev, next, first, 
last\n");
+    printf("  h [p|n|f|l|r] : naviguer dans l'historique (prev, next, first, 
last, replay\n");
     printf("  q    : quitter le mode entraînement\n");
 }
 
@@ -263,7 +263,7 @@
     printf("  j [] {} : jouer le mot [] aux coordonnées {}\n");
     printf("  p [] : passer son tour en changeant les lettres []\n");
     printf("  s [] : sauver la partie en cours dans le fichier []\n");
-    printf("  h [p|n|f|l] : naviguer dans l'historique (prev, next, first, 
last\n");
+    printf("  h [p|n|f|l|r] : naviguer dans l'historique (prev, next, first, 
last, replay\n");
     printf("  q    : quitter le mode partie libre\n");
 }
 
@@ -287,7 +287,7 @@
     printf("  j [] {} : jouer le mot [] aux coordonnées {}\n");
     printf("  n [] : passer au joueur n°[]\n");
     printf("  s [] : sauver la partie en cours dans le fichier []\n");
-    printf("  h [p|n|f|l] : naviguer dans l'historique (prev, next, first, 
last\n");
+    printf("  h [p|n|f|l|r] : naviguer dans l'historique (prev, next, first, 
last, replay\n");
     printf("  q    : quitter le mode duplicate\n");
 }
 
@@ -401,6 +401,29 @@
 }
 
 
+void handleNavigation(PublicGame &iGame, wchar_t iChar)
+{
+    switch (iChar)
+    {
+        case L'p':
+            iGame.prevTurn();
+            break;
+        case L'n':
+            iGame.nextTurn();
+            break;
+        case L'f':
+            iGame.firstTurn();
+            break;
+        case L'l':
+            iGame.lastTurn();
+            break;
+        case L'r':
+            iGame.clearFuture();
+            break;
+    }
+}
+
+
 void loop_training(PublicGame &iGame)
 {
     const wchar_t *token;
@@ -550,8 +573,7 @@
                         if (token == NULL)
                             help_training();
                         else
-                            if (iGame.trainingSetRackManual(0, token))
-                                printf("le sac ne contient pas assez de 
lettres\n");
+                            iGame.trainingSetRackManual(0, token);
                         break;
                     case L'x':
                         token = next_token_cross(NULL, delim, &state);
@@ -585,23 +607,7 @@
                     case L'h':
                         token = next_token_alpha(NULL, delim, &state);
                         if (token != NULL)
-                        {
-                            switch (token[0])
-                            {
-                                case L'p':
-                                    iGame.prevTurn();
-                                    break;
-                                case L'n':
-                                    iGame.nextTurn();
-                                    break;
-                                case L'f':
-                                    iGame.firstTurn();
-                                    break;
-                                case L'l':
-                                    iGame.lastTurn();
-                                    break;
-                            }
-                        }
+                            handleNavigation(iGame, token[0]);
                         break;
                     case L'q':
                         quit = 1;
@@ -714,23 +720,7 @@
                     case L'h':
                         token = next_token_alpha(NULL, delim, &state);
                         if (token != NULL)
-                        {
-                            switch (token[0])
-                            {
-                                case L'p':
-                                    iGame.prevTurn();
-                                    break;
-                                case L'n':
-                                    iGame.nextTurn();
-                                    break;
-                                case L'f':
-                                    iGame.firstTurn();
-                                    break;
-                                case L'l':
-                                    iGame.lastTurn();
-                                    break;
-                            }
-                        }
+                            handleNavigation(iGame, token[0]);
                         break;
                     case L'q':
                         quit = 1;
@@ -851,23 +841,7 @@
                     case L'h':
                         token = next_token_alpha(NULL, delim, &state);
                         if (token != NULL)
-                        {
-                            switch (token[0])
-                            {
-                                case L'p':
-                                    iGame.prevTurn();
-                                    break;
-                                case L'n':
-                                    iGame.nextTurn();
-                                    break;
-                                case L'f':
-                                    iGame.firstTurn();
-                                    break;
-                                case L'l':
-                                    iGame.lastTurn();
-                                    break;
-                            }
-                        }
+                            handleNavigation(iGame, token[0]);
                         break;
                     case L'q':
                         quit = 1;

Index: utils/ncurses.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/utils/ncurses.cpp,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -b -r1.30 -r1.31
--- utils/ncurses.cpp   30 Nov 2008 20:53:46 -0000      1.30
+++ utils/ncurses.cpp   24 Jan 2009 10:28:23 -0000      1.31
@@ -42,6 +42,7 @@
 #include "player.h"
 #include "history.h"
 #include "turn.h"
+#include "game_exception.h"
 #include "encoding.h"
 
 using namespace std;
@@ -697,10 +698,13 @@
     wstring letters;
     if (readString(win, y + 2, x + 2, 7, letters, kJOKER))
     {
-        int res = iGame.trainingSetRackManual(false, letters);
-        if (res)
+        try
+        {
+            iGame.trainingSetRackManual(false, letters);
+        }
+        catch (GameException &e)
         {
-            drawStatus(win, _("Cannot take these letters from the bag"));
+            drawStatus(win, _("Cannot take these letters from the bag:"));
         }
     }
     m_state = DEFAULT;

Index: test/duplicate_navigation.input
===================================================================
RCS file: test/duplicate_navigation.input
diff -N test/duplicate_navigation.input
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/duplicate_navigation.input     24 Jan 2009 10:28:21 -0000      1.1
@@ -0,0 +1,59 @@
+d 2 1
+a t
+j VIMES h4
+a g
+a p
+h p
+a g
+a p
+h n
+a g
+a p
+j JE h8
+a g
+a p
+h p
+a g
+a p
+h n
+a g
+a p
+n 1
+j JAN g7
+a T
+a S
+h r
+a g
+a p
+j AH i6
+a g
+a p
+j AY f9
+a g
+a p
+a S
+h f
+a g
+a p
+h n
+a g
+a p
+h l
+a g
+a p
+h p
+a g
+a p
+h p
+a g
+a p
+j JAN g7
+h r
+a g
+a p
+j JAN g7
+j JE 7G
+a g
+a p
+q
+q

Index: test/duplicate_navigation.ref
===================================================================
RCS file: test/duplicate_navigation.ref
diff -N test/duplicate_navigation.ref
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/duplicate_navigation.ref       24 Jan 2009 10:28:21 -0000      1.1
@@ -0,0 +1,587 @@
+Using seed: 11
+[?] pour l'aide
+commande> d 2 1
+mode duplicate
+[?] pour l'aide
+commande> a t
+IMEJVSL
+commande> j VIMES h4
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: JL
+Rack 1: IMEJVSL
+Rack 2: IMEJVSL
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: IMEJVSL
+Rack 1: IMEJVSL
+Rack 2: IMEJVSL
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: JL
+Rack 1: IMEJVSL
+Rack 2: IMEJVSL
+commande> j JE h8
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+
+   Total: 26
+
+Rack 0: JL+NHAYG
+Rack 1: JL+NHAYG
+Rack 2: JL+NHAYG
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: IMEJVSL
+Rack 1: IMEJVSL
+Rack 2: IMEJVSL
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+
+   Total: 26
+
+Rack 0: JL+NHAYG
+Rack 1: JL+NHAYG
+Rack 2: JL+NHAYG
+commande> n 1
+commande> j JAN g7
+commande> a T
+Joueur 0: JLNHAYG
+Joueur 1: GHLY
+Joueur 2: JLNHAYG
+commande> a S
+Joueur 0:   26
+Joueur 1:   56
+Joueur 2:   26
+commande> h r
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+
+   Total: 26
+
+Rack 0: JL+NHAYG
+Rack 1: GHLY
+Rack 2: JL+NHAYG
+commande> j AH i6
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  J  A  N  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+    2 | JL+NHAYG | JAN             |  G7 |  38 | 1 |  
+
+   Total: 64
+
+Rack 0: GHLY+ELA
+Rack 1: GHLY+ELA
+Rack 2: GHLY+ELA
+commande> j AY f9
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  J  A  N  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+    2 | JL+NHAYG | JAN             |  G7 |  38 | 1 |  
+
+   Total: 64
+
+Rack 0: EGHLL
+Rack 1: GHLY+ELA
+Rack 2: GHLY+ELA
+commande> a S
+Joueur 0:   80
+Joueur 1:   56
+Joueur 2:   64
+commande> h f
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: IMEJVSL
+Rack 1: IMEJVSL
+Rack 2: IMEJVSL
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+
+   Total: 26
+
+Rack 0: JL+NHAYG
+Rack 1: JL+NHAYG
+Rack 2: JL+NHAYG
+commande> h l
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  J  A  N  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+    2 | JL+NHAYG | JAN             |  G7 |  38 | 1 |  
+
+   Total: 64
+
+Rack 0: EGHLL
+Rack 1: GHLY+ELA
+Rack 2: GHLY+ELA
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  J  A  N  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+    2 | JL+NHAYG | JAN             |  G7 |  38 | 1 |  
+
+   Total: 64
+
+Rack 0: GHLY+ELA
+Rack 1: GHLY+ELA
+Rack 2: GHLY+ELA
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+
+   Total: 26
+
+Rack 0: JL+NHAYG
+Rack 1: JL+NHAYG
+Rack 2: JL+NHAYG
+commande> j JAN g7
+Cannot add a command to an old turn
+commande> h r
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+
+   Total: 26
+
+Rack 0: JL+NHAYG
+Rack 1: JL+NHAYG
+Rack 2: JL+NHAYG
+commande> j JAN g7
+commande> j JE 7G
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  J  A  N  -  -  -  -  -  -
+ H   -  -  -  V  I  M  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Duplicate
+Player 0: Human
+Player 1: Human
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  IMEJVSL | VIMES           |  H4 |  26 | 0 |  
+    2 | JL+NHAYG | JAN             |  G7 |  38 | 1 |  
+
+   Total: 64
+
+Rack 0: GHLY+ITA
+Rack 1: GHLY+ITA
+Rack 2: GHLY+ITA
+commande> q
+fin du mode duplicate
+commande> q

Index: test/freegame_navigation.input
===================================================================
RCS file: test/freegame_navigation.input
diff -N test/freegame_navigation.input
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/freegame_navigation.input      24 Jan 2009 10:28:21 -0000      1.1
@@ -0,0 +1,47 @@
+l 1 2
+a T
+j TONNE h4
+a g
+a p
+j WELcHE 3c
+a g
+a p
+h p
+a g
+a p
+h p
+a g
+a p
+h r
+a p
+a g
+h f
+a p
+a g
+h n
+a g
+a p
+h n
+a g
+a p
+h r
+a g
+a p
+h n
+j aWELE 3f
+a g
+a p
+p
+a g
+a p
+h f
+a g
+a p
+h n
+a g
+a p
+h l
+a g
+a p
+q
+q

Index: test/freegame_navigation.ref
===================================================================
RCS file: test/freegame_navigation.ref
diff -N test/freegame_navigation.ref
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/freegame_navigation.ref        24 Jan 2009 10:28:21 -0000      1.1
@@ -0,0 +1,544 @@
+Using seed: 10
+[?] pour l'aide
+commande> l 1 2
+mode partie libre
+[?] pour l'aide
+commande> a T
+Joueur 0: NONTEEL
+Joueur 1: NBZEUAU
+Joueur 2: NUDATMG
+commande> j TONNE h4
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  T  U  -  -  -  -  -  -  -  -  -
+ H   -  -  -  T  O  N  N  E  -  -  -  -  -  -  -
+ I   -  -  -  -  N  E  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  Z  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+
+   Total: 66
+
+Rack 0: EL+HI?WE
+Rack 1: BNU+FYTE
+Rack 2: DGU+IDVA
+commande> j WELcHE 3c
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  W  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  E  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  L  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  c  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  H  -  T  U  -  -  -  -  -  -  -  -  -
+ H   -  B  E  T  O  N  N  E  -  -  -  -  -  -  -
+ I   V  E  -  -  N  E  -  -  -  -  -  -  -  -  -
+ J   A  Y  -  -  -  Z  -  -  -  -  -  -  -  -  -
+ K   G  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   I  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+    4 | EL+HI?WE | WELcHE          |  3C |  48 | 0 |  
+    5 | BNU+FYTE | BEY             |  2H |  43 | 1 |  
+    6 | DGU+IDVA | VAGI            |  1I |  25 | 2 |  
+
+   Total: 182
+
+Rack 0: I+SSPRNS
+Rack 1: FNTU+FIA
+Rack 2: DDU+?ERA
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  W  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  E  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  L  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  c  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  H  -  T  U  -  -  -  -  -  -  -  -  -
+ H   -  B  E  T  O  N  N  E  -  -  -  -  -  -  -
+ I   -  E  -  -  N  E  -  -  -  -  -  -  -  -  -
+ J   -  Y  -  -  -  Z  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+    4 | EL+HI?WE | WELcHE          |  3C |  48 | 0 |  
+    5 | BNU+FYTE | BEY             |  2H |  43 | 1 |  
+
+   Total: 157
+
+Rack 0: I+SSPRNS
+Rack 1: FNTU+FIA
+Rack 2: DGU+IDVA
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  W  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  E  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  L  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  c  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  H  -  T  U  -  -  -  -  -  -  -  -  -
+ H   -  -  E  T  O  N  N  E  -  -  -  -  -  -  -
+ I   -  -  -  -  N  E  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  Z  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+    4 | EL+HI?WE | WELcHE          |  3C |  48 | 0 |  
+
+   Total: 114
+
+Rack 0: I+SSPRNS
+Rack 1: BNU+FYTE
+Rack 2: DGU+IDVA
+commande> h r
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+    4 | EL+HI?WE | WELcHE          |  3C |  48 | 0 |  
+    5 | BNU+FYTE | BEY             |  2H |  43 | 1 |  
+    6 | DGU+IDVA | VAGI            |  1I |  25 | 2 |  
+
+   Total: 182
+
+Rack 0: I+SSPRNS
+Rack 1: FNTU+FIA
+Rack 2: DDU+?ERA
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  W  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  E  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  L  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  c  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  H  -  T  U  -  -  -  -  -  -  -  -  -
+ H   -  B  E  T  O  N  N  E  -  -  -  -  -  -  -
+ I   V  E  -  -  N  E  -  -  -  -  -  -  -  -  -
+ J   A  Y  -  -  -  Z  -  -  -  -  -  -  -  -  -
+ K   G  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   I  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> h f
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: NONTEEL
+Rack 1: NBZEUAU
+Rack 2: NUDATMG
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  T  O  N  N  E  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+
+   Total: 12
+
+Rack 0: EL+HI?WE
+Rack 1: NBZEUAU
+Rack 2: NUDATMG
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  A  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  U  -  -  -  -  -  -  -  -  -
+ H   -  -  -  T  O  N  N  E  -  -  -  -  -  -  -
+ I   -  -  -  -  -  E  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  Z  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+
+   Total: 48
+
+Rack 0: EL+HI?WE
+Rack 1: BNU+FYTE
+Rack 2: NUDATMG
+commande> h r
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  T  U  -  -  -  -  -  -  -  -  -
+ H   -  -  -  T  O  N  N  E  -  -  -  -  -  -  -
+ I   -  -  -  -  N  E  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  Z  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+
+   Total: 66
+
+Rack 0: EL+HI?WE
+Rack 1: BNU+FYTE
+Rack 2: DGU+IDVA
+commande> h n
+commande> j aWELE 3f
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  a  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  W  -  T  U  -  -  B  -  -  -  -  -  -
+ H   -  -  E  T  O  N  N  E  E  -  -  -  -  -  -
+ I   -  -  L  -  N  E  -  -  Y  -  -  -  -  -  -
+ J   -  V  E  -  -  Z  -  -  -  -  -  -  -  -  -
+ K   -  A  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  G  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  I  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+    4 | EL+HI?WE | aWELE           |  3F |  30 | 0 |  
+    5 | BNU+FYTE | BEY             |  9G |  34 | 1 |  
+    6 | DGU+IDVA | VAGI            |  2J |  29 | 2 |  
+
+   Total: 159
+
+Rack 0: HI+CEEEP
+Rack 1: FNTU+FSR
+Rack 2: DDU+OREE
+commande> p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  a  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  W  -  T  U  -  -  B  -  -  -  -  -  -
+ H   -  -  E  T  O  N  N  E  E  -  -  -  -  -  -
+ I   -  -  L  -  N  E  -  -  Y  -  -  -  -  -  -
+ J   -  V  E  R  -  Z  -  -  -  -  -  -  -  -  -
+ K   -  A  -  E  -  -  -  -  -  -  -  -  -  -  -
+ L   -  G  -  D  -  -  -  -  -  -  -  -  -  -  -
+ M   -  I  -  O  -  -  -  -  -  -  -  -  -  -  -
+ N   -  T  U  R  F  S  -  -  -  -  -  -  -  -  -
+ O   -  -  -  E  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+    4 | EL+HI?WE | aWELE           |  3F |  30 | 0 |  
+    5 | BNU+FYTE | BEY             |  9G |  34 | 1 |  
+    6 | DGU+IDVA | VAGI            |  2J |  29 | 2 |  
+    7 | HI+CEEEP | (PASS)          |  -  |   0 | 0 |
+    8 | FNTU+FSR | TURFS           |  N2 |  38 | 1 |  
+    9 | DDU+OREE | REDORE          |  4J |  22 | 2 |  
+
+   Total: 219
+
+Rack 0: CEEEHIP
+Rack 1: FN+IIGIA
+Rack 2: DU+LRIUS
+commande> h f
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: NONTEEL
+Rack 1: NBZEUAU
+Rack 2: NUDATMG
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  T  O  N  N  E  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+
+   Total: 12
+
+Rack 0: EL+HI?WE
+Rack 1: NBZEUAU
+Rack 2: NUDATMG
+commande> h l
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  M  -  -  -  -  -  -  -  -  -  -
+ F   -  -  a  -  A  A  -  -  -  -  -  -  -  -  -
+ G   -  -  W  -  T  U  -  -  B  -  -  -  -  -  -
+ H   -  -  E  T  O  N  N  E  E  -  -  -  -  -  -
+ I   -  -  L  -  N  E  -  -  Y  -  -  -  -  -  -
+ J   -  V  E  R  -  Z  -  -  -  -  -  -  -  -  -
+ K   -  A  -  E  -  -  -  -  -  -  -  -  -  -  -
+ L   -  G  -  D  -  -  -  -  -  -  -  -  -  -  -
+ M   -  I  -  O  -  -  -  -  -  -  -  -  -  -  -
+ N   -  T  U  R  F  S  -  -  -  -  -  -  -  -  -
+ O   -  -  -  E  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Free game
+Player 0: Human
+Player 1: Computer
+Player 2: Computer
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  NONTEEL | TONNE           |  H4 |  12 | 0 |  
+    2 |  NBZEUAU | AUNEZ           |  6F |  36 | 1 |  
+    3 |  NUDATMG | MATON           |  5E |  18 | 2 |  
+    4 | EL+HI?WE | aWELE           |  3F |  30 | 0 |  
+    5 | BNU+FYTE | BEY             |  9G |  34 | 1 |  
+    6 | DGU+IDVA | VAGI            |  2J |  29 | 2 |  
+    7 | HI+CEEEP | (PASS)          |  -  |   0 | 0 |
+    8 | FNTU+FSR | TURFS           |  N2 |  38 | 1 |  
+    9 | DDU+OREE | REDORE          |  4J |  22 | 2 |  
+
+   Total: 219
+
+Rack 0: CEEEHIP
+Rack 1: FN+IIGIA
+Rack 2: DU+LRIUS
+commande> q
+fin du mode partie libre
+commande> q

Index: test/training_navigation.input
===================================================================
RCS file: test/training_navigation.input
diff -N test/training_navigation.input
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/training_navigation.input      24 Jan 2009 10:28:22 -0000      1.1
@@ -0,0 +1,61 @@
+e
+*
+a t
+r
+n 1
++
+a t
+r
+n 1
++
+a t
+r
+n 1
+a g
+a p
+h n
+a g
+a p
+h p
+a g
+a p
+h p
+a g
+a p
+h p
+a g
+a p
+h l
+a g
+a p
++
+a t
+t ABCDEFG
+a t
+*
+a t
+h p
+a g
+a p
++
+h f
+a g
+a p
+h n
+a g
+a p
+h n
+a g
+a p
+*
++
+t HELLO
+a t
+h r
+t HELLO
+r
+n 1
+a g
+a p
+q
+q

Index: test/training_navigation.ref
===================================================================
RCS file: test/training_navigation.ref
diff -N test/training_navigation.ref
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ test/training_navigation.ref        24 Jan 2009 10:28:22 -0000      1.1
@@ -0,0 +1,395 @@
+Using seed: 0
+[?] pour l'aide
+commande> e
+mode entraînement
+[?] pour l'aide
+commande> *
+commande> a t
+SEUTISG
+commande> r
+commande> n 1
+commande> +
+commande> a t
+SUXULRO
+commande> r
+commande> n 1
+commande> +
+commande> a t
+ORSUSCD
+commande> r
+commande> n 1
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  L  U  X  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  S  O  U  R  D  S  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+    2 | SU+XULRO | LUX             |  I5 |  47 | 0 |  
+    3 | ORSU+SCD | SOURDS          |  J6 |  30 | 0 |  
+
+   Total: 93
+
+Rack 0: C
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  L  U  X  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  S  O  U  R  D  S  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+    2 | SU+XULRO | LUX             |  I5 |  47 | 0 |  
+    3 | ORSU+SCD | SOURDS          |  J6 |  30 | 0 |  
+
+   Total: 93
+
+Rack 0: C
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  L  U  X  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+    2 | SU+XULRO | LUX             |  I5 |  47 | 0 |  
+
+   Total: 63
+
+Rack 0: ORSU
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+
+   Total: 16
+
+Rack 0: SU
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: 
+commande> h l
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  L  U  X  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  S  O  U  R  D  S  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+    2 | SU+XULRO | LUX             |  I5 |  47 | 0 |  
+    3 | ORSU+SCD | SOURDS          |  J6 |  30 | 0 |  
+
+   Total: 93
+
+Rack 0: C
+commande> +
+commande> a t
+C?BETNL
+commande> t ABCDEFG
+commande> a t
+ABCDEFG
+commande> *
+commande> a t
+URLERIE
+commande> h p
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  L  U  X  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  S  O  U  R  D  S  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+    2 | SU+XULRO | LUX             |  I5 |  47 | 0 |  
+    3 | ORSU+SCD | SOURDS          |  J6 |  30 | 0 |  
+
+   Total: 93
+
+Rack 0: C
+commande> +
+Cannot add a command to an old turn
+commande> h f
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+
+   Total: 0
+
+Rack 0: 
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+
+   Total: 16
+
+Rack 0: SU
+commande> h n
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  L  U  X  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+    2 | SU+XULRO | LUX             |  I5 |  47 | 0 |  
+
+   Total: 63
+
+Rack 0: ORSU
+commande> *
+Cannot add a command to an old turn
+commande> +
+Cannot add a command to an old turn
+commande> t HELLO
+Cannot add a command to an old turn
+commande> a t
+ORSU
+commande> h r
+commande> t HELLO
+commande> r
+commande> n 1
+commande> a g
+     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
+ A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ H   -  -  -  G  I  T  E  S  -  -  -  -  -  -  -
+ I   -  -  -  -  L  U  X  -  -  -  -  -  -  -  -
+ J   -  -  -  -  -  -  O  H  E  -  -  -  -  -  -
+ K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+ O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
+commande> a p
+Eliot 1.5
+
+Game type: Training
+Player 0: Human
+
+    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
+   ===|==========|=================|=====|=====|===|======
+    1 |  SEUTISG | GITES           |  H4 |  16 | 0 |  
+    2 | SU+XULRO | LUX             |  I5 |  47 | 0 |  
+    3 |    HELLO | OHE             |  J7 |  18 | 0 |  
+
+   Total: 81
+
+Rack 0: LL
+commande> q
+fin du mode entraînement
+commande> q

Index: test/training_back.input
===================================================================
RCS file: test/training_back.input
diff -N test/training_back.input
--- test/training_back.input    16 Oct 2008 17:51:16 -0000      1.4
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-e
-t EA?AEBF
-r
-n 1
-t LMUAEYE
-r
-a r
-n 2
-a g
-a s
-n -1
-a s
-a g
-a p
-n -1
-a s
-a p
-a g
-a l
-n -1
-a s
-t IEIEIEF
-r
-j FIEE H8
-a s
-a l
-a p
-q
-q

Index: test/training_back.ref
===================================================================
RCS file: test/training_back.ref
diff -N test/training_back.ref
--- test/training_back.ref      23 Nov 2008 08:33:17 -0000      1.9
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,137 +0,0 @@
-Using seed: 0
-[?] pour l'aide
-commande> e
-mode entraînement
-[?] pour l'aide
-commande> t EA?AEBF
-commande> r
-commande> n 1
-commande> t LMUAEYE
-commande> r
-commande> a r
-  1: AY                 46 I6
-  2: YEBLE              38 6F
-  3: BAYLE              36 6H
-  4: MAYE               36 I3
-  5: AMYLE              35 10D
-  6: BAYE               35 6H
-  7: ELYME              35 10D
-  8: ELYME              35 10H
-  9: BEY                34 6H
- 10: LAYE               34 I3
-commande> n 2
-commande> a g
-     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
- A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- F   -  -  -  -  -  Y  -  -  -  -  -  -  -  -  -
- G   -  -  -  -  -  E  -  -  -  -  -  -  -  -  -
- H   -  -  -  F  A  B  A  c  E  E  -  -  -  -  -
- I   -  -  -  -  -  L  -  -  -  -  -  -  -  -  -
- J   -  -  -  -  -  E  -  -  -  -  -  -  -  -  -
- K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
-commande> a s
-118
-commande> n -1
-commande> a s
-80
-commande> a g
-     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
- A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- H   -  -  -  F  A  B  A  c  E  E  -  -  -  -  -
- I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
-commande> a p
-Eliot 1.5
-
-Game type: Training
-Player 0: Human
-
-    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
-   ===|==========|=================|=====|=====|===|======
-    1 |  EA?AEBF | FABAcEE         |  H4 |  80 | 0 | *
-
-   Total: 80
-
-Rack 0: LMUAEYE
-commande> n -1
-commande> a s
-0
-commande> a p
-Eliot 1.5
-
-Game type: Training
-Player 0: Human
-
-    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
-   ===|==========|=================|=====|=====|===|======
-
-   Total: 0
-
-Rack 0: EA?AEBF
-commande> a g
-     1  2  3  4  5  6  7  8  9 10 11 12 13 14 15
- A   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- B   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- C   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- D   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- E   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- F   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- G   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- H   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- I   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- J   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- K   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- L   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- M   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- N   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
- O   -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
-commande> a l
- A B C D  E F G H I J K L M N O P Q R S T U V W X Y Z ?
- 9 2 2 3 15 2 2 2 8 1 1 5 3 6 6 2 1 6 6 6 6 2 1 1 1 1 2
-commande> n -1
-Cannot go back that far
-commande> a s
-0
-commande> t IEIEIEF
-commande> r
-commande> j FIEE H8
-commande> a s
-14
-commande> a l
- A B C D  E F G H I J K L M N O P Q R S T U V W X Y Z ?
- 9 2 2 3 13 1 2 2 7 1 1 5 3 6 6 2 1 6 6 6 6 2 1 1 1 1 2
-commande> a p
-Eliot 1.5
-
-Game type: Training
-Player 0: Human
-
-    N |   RACK   |    SOLUTION     | REF | PTS | P | BONUS
-   ===|==========|=================|=====|=====|===|======
-    1 |  IEIEIEF | FIEE            |  H8 |  14 | 0 |  
-
-   Total: 14
-
-Rack 0: EII
-commande> q
-fin du mode entraînement
-commande> q




reply via email to

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