Commit graph

30 commits

Author SHA1 Message Date
Olivier Teulière
f6999a720d Fix mismatch declaration between struct and class 2013-03-03 01:07:41 +01:00
Olivier Teulière
4200e33c17 Change the copyright years for all the files modified in 2012 2012-10-11 13:45:24 +02:00
Olivier Teulière
bf42c49850 Added loggers to most classes 2012-02-19 13:07:29 +01:00
Olivier Teulière
3c7a84d543 Support saving/loading games (any game type) in XML format.
Status:
It works well, but there are still a few details to improve/fix

More details about the changes:
 - New dependency on Arabica and Libxml2 to parse the XML
 - Loading the old format is still supported for this release, but won't be supported anymore in the next one
 - Games are now only saved in the new format
 - In training mode, the player is now created externally, like in the other modes
 - Avoid using GameIO (the one from game/) whenever possible
 - Do not use a FILE* argument anymore when loading a game
 - Throw and catch exceptions correctly when a game cannot be loaded or saved
 - The non-regression tests now use a new method to print the game history
2009-11-29 16:01:31 +00:00
Olivier Teulière
43d42a0388 Little hack to have the 7+1 search in alphabetical order (or more precisely, in the order of the letters as defined at dictionary creation) 2009-09-21 20:10:34 +00:00
Olivier Teulière
02e4cb2970 - Invalid moves should be in the display form
- Moved some code from Header to Dictionary
2009-07-03 21:40:14 +00:00
Olivier Teulière
0e9711da25 Accept various inputs for the same tile in the Qt interface.
The dictionary format still needs to support that.
2009-06-27 18:09:44 +00:00
Olivier Teulière
da85bde477 First step in accepting various input strings for the same tile: input coming from the text interface is now passed through a conversion method (... which does nothing yet!) 2009-06-23 21:39:07 +00:00
Olivier Teulière
7569a58bb7 Each letter (tile) now has a display string, defaulting to its internal char. It is not yet possible to change it.
This display string is used in the ncurses and Qt interfaces.

Display strings are types "wdstring" instead of plain "wstring" in a few places (not all of them) to help recognize them.
2009-06-23 12:41:53 +00:00
Olivier Teulière
66538b4806 Removed support for the old dictionary format. The code becomes simpler and (very slightly) faster. 2008-11-22 13:11:48 +00:00
Olivier Teulière
70be50c64e A lot of clean-up:
- Removed logiv from the History class
 - Used BOOST_FOREACH to simplify loops
 - Remove useless annotations and doxygen blocks
 - Added some constness
 - Marked Training::setRack() as deprecated
 - Improved compilation order in game/
2008-11-22 13:09:28 +00:00
Olivier Teulière
75a67b28a5 Dic:
- Throw an exception if a regular expresison is invalid
 - Handle the exception in callers code

Game:
 - Fixed a bug in setRackRandom()

Qt interface:
 - Display the dictionary name in the status bar
 - Implemented printing
 - Translation of the interface into French. The menus have temporarily lost their accelerator keys in English.
2008-08-31 11:48:11 +00:00
Olivier Teulière
a32f1b7aaf Dic:
- regexp search results are now in uppercase, like other results
 - the regexp search indicates if there are more results than the maximum
   allowed
Qt interface:
 - new window with some dictionary tools: check word, word+1 and regexp search
2008-08-27 21:20:03 +00:00
Olivier Teulière
90badeca21 - Fixed a bug in the parser, preventing to parse correctly some regular expressions with wide chars. The regular expressions seem now to work fine with a dictionary using polish words.
- More C++ in the automaton code
 - Simplified the code in several places
2008-07-27 13:32:47 +00:00
Olivier Teulière
11adaba410 - Added several tests for the regular expressions engine
- New regexp parser using Boost.Spirit. Lex and yacc are now gone.
   The main advantage of this new parser, apart from being purely C++,
   is that it can handle wide characters.
   Currently, the new parser does the same as the previous one, but the
   code is not yet ready to use regular expressions with non-ASCII
   dictionaries.
2008-07-07 17:29:59 +00:00
Olivier Teulière
414baa8d7a - Use vectors instead of lists to store the results of dictionary searches
- New parameter to most search functions, allowing to limit the number of results.
   No interface uses it yet.
2008-03-02 18:45:10 +00:00
Olivier Teulière
e7a8d01a8d Merged the "cppdic" branch back into HEAD.
There are too many change to list properly, here is an overview of the main changes:
 - the dictionary is now in C++
 - the dictionary has a new format, where it is possible to specify the letters,
   their points, their frequency, ... It is backwards compatible.
 - Eliot now supports non-ASCII characters everywhere
 - i18n of the compdic, listdic, regexpmain binaries
 - i18n of the wxWidgets interface (now in english by default)
2008-01-08 13:52:32 +00:00
Antoine Fraboulet
86c65ebc4a - add load dictionnary functions for bigendian arch
regression test is ok on linux/ppc
2006-04-16 11:27:19 +00:00
Antoine Fraboulet
c44a16dc13 - small typo fix in comments
- add doxygen file description
  - revert Dic_chr / board_search patch
    returning the character instead of the code
    was a HUGE performance penalty
    The dictionary must use codes, the board must be
    made to use codes instead of dic using tiles.
  - add Dic_char and Dic_char_lookup as temporary
    fixes for board_search. Should modify Board and Cross class
    instead.
  - create dic_code_t type
2006-01-01 19:51:00 +00:00
Olivier Teulière
96fe9f22b1 Dic_chr returns the actual char, not a code between 0 and 31.
Dic_lookup takes a string containing real chars, not codes.
The idea is to hide the internal representation of the characters from the
users of the dictionary, who don't care about it.
2005-12-24 18:42:44 +00:00
Olivier Teulière
fe13a5e627 Removed the $Id:$ lines on HEAD 2005-11-04 20:00:05 +00:00
Olivier Teulière
e3bc46b114 Updated licence text with FSF's new address. 2005-10-23 14:53:42 +00:00
Antoine Fraboulet
b9f9bd763e - regexp are now complete and correct
- licence update in files header
2005-05-05 23:45:04 +00:00
Antoine Fraboulet
2b829c1768 doxygen doc changes 2005-04-26 07:37:55 +00:00
Antoine Fraboulet
c8dde79bc3 uint_t -> dic_elt_t for dictionary 2005-04-20 18:11:00 +00:00
Antoine Fraboulet
be0dea2a08 - documentation added for the dictionary
- regexp is now working (still needs some testing)
- regexp syntax error recovery is not implemented
2005-04-19 16:26:50 +00:00
Olivier Teulière
5b70753b50 Fixed a warning in Doxygen generation 2005-04-10 13:35:10 +00:00
Antoine Fraboulet
4f1420ed31 - minor dictionary .h changes
- starting integrating regexp into eliot
2005-04-09 19:16:09 +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
Antoine Fraboulet
90b1affcef *** empty log message *** 2004-04-08 09:43:06 +00:00