Commit graph

351 commits

Author SHA1 Message Date
Olivier Teulière
4a71c13990 Initialize the random numbers generator before setting the first racks... 2005-04-02 18:22:53 +00:00
Olivier Teulière
f38e884d31 Simplification 2005-04-02 18:21:24 +00:00
Olivier Teulière
ce71e10aef Fixed a comment and made PlayedRack::toString() a const method 2005-04-02 18:05:21 +00:00
Olivier Teulière
383548a799 Fixed compilation of Board::checkDouble() in debug mode (the == operator was
missing for Cross objects)
2005-04-02 17:59:07 +00:00
Antoine Fraboulet
8121c6ab4c raccords and benjamins are now search active 2005-03-29 08:22:55 +00:00
Antoine Fraboulet
fd1e57b115 - modifications for clean compile wx2.4, wx2.5 seems to have various font rendering problems 2005-03-29 08:05:18 +00:00
Antoine Fraboulet
8390d456b5 some progress but still incomplete interface 2005-03-29 07:00:39 +00:00
Antoine Fraboulet
08f15f9fe7 checkDouble does not work un debug mode, don't know why (Matrix[][] does not resolve to template type ?) 2005-03-29 06:58:23 +00:00
Antoine Fraboulet
ebe08e3d6e add a getCurrentRack for display purpose 2005-03-29 06:56:06 +00:00
Antoine Fraboulet
ae729ca8ae add toString method for PlayedRack text display 2005-03-29 06:54:08 +00:00
Olivier Teulière
7406f2c3c5 Added support for "Joker games", available using --joker on the command-line.
This is a kind of hack currently, but it works well...
2005-03-28 22:07:22 +00:00
Olivier Teulière
4dcc22f27a Added comments on what we should do, according to the rules in he ODS 2005-03-28 15:23:55 +00:00
Olivier Teulière
178560bc63 Repaired handling of changing letters 2005-03-28 14:55:27 +00:00
Olivier Teulière
5f63f46635 Display the "search complete" message only when the search is complete... 2005-03-27 22:21:29 +00:00
Olivier Teulière
bd07fedf18 Fixed a stupid bug i just introduced 2005-03-27 22:08:31 +00:00
Olivier Teulière
57c1fcaf8e Added an ASSERT macro, which aborts execution if the condition given as a
parameter is not verified. This simplifies te code in several places.
The old PDEBUG macro has been removed.
2005-03-27 21:45:04 +00:00
Olivier Teulière
5784cec146 Added/updated comments in many headers 2005-03-27 17:30:48 +00:00
Olivier Teulière
f45fd22c16 The game mode and the players are nod hardcoded anymore in the ncurses
interface: they can be entered with the command-line (parsed using getopt).
The text interface does not benefit from this facility yet.
2005-03-03 22:14:41 +00:00
Olivier Teulière
8b54450438 Added .cvsignore file 2005-02-27 20:11:53 +00:00
Olivier Teulière
fb0dcb7d71 Added wxwin.m4 to allow building on environments where wxWidgets is not present 2005-02-27 16:57:02 +00:00
Olivier Teulière
7db671ad31 Isolated the print* methods in a dedicated class, outside of the Game library 2005-02-26 22:57:34 +00:00
Olivier Teulière
6ca09c9ac9 Added a GameFactory class to centralize the allocation and deallocation of
Game objects.
2005-02-24 08:06:24 +00:00
Olivier Teulière
85debd4343 Support for loading a game in the ncurses interface 2005-02-22 23:12:57 +00:00
Olivier Teulière
bbae15d9ad Added support for saving a game from the ncurses interface 2005-02-21 22:42:06 +00:00
Olivier Teulière
f35c448133 Do not say that wxwidgets is enabled by default when it is not 2005-02-18 18:16:23 +00:00
Olivier Teulière
82547c5f66 - Better handling of the players with inheritance and with a clean interface
for the AI players
 - Moved the search results accessors from Game to Training
2005-02-17 20:01:59 +00:00
Olivier Teulière
222d1989a2 Cosmetics 2005-02-13 17:14:31 +00:00
Olivier Teulière
cf94b4e015 Handling of which player has played is only done in the Duplicate class now
(since the other modes do not need this)
2005-02-12 18:54:57 +00:00
Olivier Teulière
d41530c496 Minor API enhancements 2005-02-09 22:33:56 +00:00
Olivier Teulière
104335e6aa - Completed i18n of the ncurses interface
- Updated french translation
2005-02-07 22:20:32 +00:00
Olivier Teulière
91048b8dbe Link correctly with libintl in all cases 2005-02-06 22:38:10 +00:00
Olivier Teulière
0032104189 - i18n system is in place (requires gettext 0.11.5).
Very few strings are marked as translatable yet...
 - ncurses.cpp: fixed a memory leak
2005-02-06 22:18:11 +00:00
Olivier Teulière
b7032e2d78 - The Game library is now in C++.
This simplifies the code in many places, and allows inheritance of the
   game mode classes (Training, Duplicate and FreeGame).
 - A Tile is no more an unsigned char, but a class: it should help supporting
   i18n of the game. The Dic library still uses unsigned chars though.
 - Improved the configure script, to enable/disable the compilation of some
   interfaces.
 - Added a ncurses interface, much nicer than the text one. The game mode and
   the number of players are currently hardcoded, it is not possible to change
   them interactively (yet).
 - Repaired the save/load functions.

NOTE: The wxWindows interface compiles, but is completely broken. I'm afraid it
needs a full rewrite (to support the various game modes in particular).
2005-02-05 11:14:56 +00:00
Olivier Teulière
f6157c71b9 Compilation fixes for the Unicode build of wxWidgets 2005-01-01 15:42:55 +00:00
Olivier Teulière
f8074f5e02 Forgot these files 2004-08-07 18:25:03 +00:00
Olivier Teulière
b102aafbcd Support for 3 different game modes:
- 'Training' mode: same behaviour as before
  - 'Duplicate' mode: all the players (who can be human players or AI
    players) have the same rack, and the best word is played on the
    board
  - 'Free game' mode: the players (human or AI) have different racks,
    and they play one after another

Status:
  - Core: the main functions are written, but the API could be more
    homogeneous between the different modes.
  - Interfaces: the text interface is almost up-to-date, but the
    wxwindows one only supports Training mode.
  - AI: Currently, AI players always play the best word, which is
    optimal in Duplicate mode but not in FreeGame mode. Other strategies
    will be written in the future.
  - Handling of saved games is broken: a game can be saved and loaded,
    but no information about the mode and the players is stored, so it
    crashes whatever you do after loading the game.
2004-08-07 18:10:42 +00:00
Olivier Teulière
acd1aa0f1b Added .cvsignore files 2004-07-08 18:17:31 +00:00
Olivier Teulière
a72234c4c0 Quick string review 2004-07-05 21:39:16 +00:00
Olivier Teulière
ac04544f70 Increased PLAYEDRACK_MAX, to avoid a crash when too many words were
played in a game
2004-07-04 18:50:30 +00:00
Olivier Teulière
d2373e0fc0 Explications pour la (cross-)compilation Windows 2004-07-04 16:54:35 +00:00
Olivier Teulière
c5fc8ce8b4 Mise jour de quelques macros 2004-06-26 14:47:39 +00:00
Olivier Teulière
dfee04c4a9 Fix pour la compilation Windows avec wxWindows 2.5 2004-06-26 10:40:02 +00:00
Olivier Teulière
61963c0fe0 Fix pour la compilation windows, et la compatibilit avec wxWindows 2.5
(pas encore suffisant)
2004-06-22 21:04:07 +00:00
Antoine Fraboulet
3241a1c1af ajout de regexp.c 2004-06-21 16:06:54 +00:00
Antoine Fraboulet
1b498989bd dbut des ER, parcours d'arbre ok, construction automate ok. Manque construction
de l'arbre et utilisation automate avec dictionnaire.
2004-06-20 20:13:59 +00:00
Antoine Fraboulet
22b196f8e9 taille minimale pour les fentres dans Reload() 2004-06-20 20:00:09 +00:00
Antoine Fraboulet
c7899d0807 *** empty log message *** 2004-06-19 18:43:35 +00:00
Antoine Fraboulet
d2ec7dfc1c *** empty log message *** 2004-04-08 10:46:49 +00:00
Antoine Fraboulet
45b4adbf42 CVS import on gnu.org 2004-04-08 10:21:56 +00:00
Antoine Fraboulet
673a0e7828 *** empty log message *** 2004-04-08 09:57:28 +00:00