Commit graph

43 commits

Author SHA1 Message Date
Olivier Teulière
80fa47d71b BoardLayout: make a method public, and use it to simplify an assertion 2013-01-19 00:36:07 +01:00
Olivier Teulière
2db1732f7a Board: allow one more type of invalid word when previewing a played word 2013-01-11 11:06:56 +01:00
Olivier Teulière
5441007db1 New BoardLayout class to wrap the board layout (size and special squares).
Until now there is no user-visible change, but it should make it much
easier to add custom layouts.
2012-12-29 17:50:18 +01:00
Olivier Teulière
fb8e464d7c Display the word being played on the board 2012-12-29 17:46:18 +01:00
Olivier Teulière
2c3cb83e0a Allow more types of invalid input when previewing a move being played 2012-12-29 17:46:18 +01:00
Olivier Teulière
d55b3b2bdf Use toLower() and toUpper() 2012-12-29 17:46:17 +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
cbdf6d010d Various minor improvements (no functional change) 2012-06-27 21:33:19 +02:00
Olivier Teulière
038910e5df Removed a few useless assignations and Tile copies 2012-02-21 08:22:32 +01:00
Olivier Teulière
66eec913c9 Added several assertions 2012-02-21 08:22:32 +01:00
Olivier Teulière
32957abfcc When playing a word, forbid using a joker to specify a letter on the board (even a joker).
This is just a convention, but a reasonable one :)
2012-02-21 08:22:32 +01:00
Olivier Teulière
0be2769dfa New utility methods to get the lowercase (joker) or uppercase (no joker) variant of a tile 2012-02-21 08:22:32 +01:00
Olivier Teulière
0d45fc6227 When showing a preview on the board, do not hijack the normal internal data 2012-02-21 08:22:32 +01:00
Olivier Teulière
1336e3b65d Board: use the isVacant() method a bit more 2012-02-19 13:07:29 +01:00
Olivier Teulière
bf42c49850 Added loggers to most classes 2012-02-19 13:07:29 +01:00
Olivier Teulière
fd0bf204cc Fixed the variable used in board* 2011-08-27 21:55:49 +02:00
Olivier Teulière
fdc29871e5 New GameParams class to wrap a few game characteristics.
These characteristics will not change during the game.
2011-08-27 21:55:49 +02: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
3a82ab75fd More uses of the display characters 2009-06-23 13:21:19 +00:00
Olivier Teulière
47e4b8c6b0 Simplifications 2009-06-23 12:56:40 +00:00
Olivier Teulière
6f14e34fe7 Allow the first word to be vertical 2009-03-12 18:56:25 +00:00
Olivier Teulière
771ba0c35e New BoardSearch class to avoid carrying const parameters all over the place.
No functional change.
2009-01-17 14:57:32 +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
12cc41fce7 Core:
- Fixed a crash on Windows
 - Do not authorize words if the cross-checks are invalid (it was possible when playing a joker)
 - Fixed detextion of invalid moves
 - Improved unit tests, and fixed a bug in one of them

Qt interface:
 - Do not allow playing a word if the coordinates are missing
 - Better focus
2008-09-13 21:32:45 +00:00
Olivier Teulière
81e980104f - Board::GetLetterMultiplier() and Board::GetWordMultiplier() are now static
- Added 2 convenient getters: Dictionary::getName() and Bag::getDic()
2008-01-09 10:48:19 +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
d86bd2af4a - 32/64 bits types
- unused function parameters
2007-08-04 20:01:27 +00:00
Olivier Teulière
421d0a29b1 Fixed a few char/wchar_t issues. The remaining ones need a wchar_t-aware dictionary 2006-12-23 13:50:43 +00:00
Antoine Fraboulet
603a75a98c - extra debug output command for board cross info
- simplified cross class
- bug fix on cross information handling during backward moves
2006-11-05 13:30:06 +00:00
Antoine Fraboulet
f9af9493d2 - bug correction for game::play when playing on a joker tile 2006-08-11 22:12:10 +00:00
Olivier Teulière
77be2e9219 Backport of the 'multibyte' branch on HEAD. 2006-01-22 12:23:52 +00:00
Antoine Fraboulet
4665fa176b - add comments and emacs mode 2006-01-01 19:49:35 +00:00
Olivier Teulière
12894e00e2 Take more advantage of the Coord class, and remove the useless accessors
from Round (to force using the Coord object)
2005-11-05 13:56:59 +00:00
Olivier Teulière
85a30f16a2 Use the Coord class for rounds 2005-11-05 11:01:58 +00:00
Olivier Teulière
50fc82f60c First backports from the branch (Game::getBoard and Game::getBag, mainly) 2005-11-04 23:26:03 +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
Olivier Teulière
25304bd978 test/*: Added non-regression tests, based on the text interface.
'regression.pl' is the script that runs the regression, and 'drivers' contains
the list of scenario files to be played.
By default, the complete regerssion is played, but you can play specific
scenarios by adding them to the command-line.
Example: ./regression.pl training_bag freegame_change
2005-04-16 15:47:59 +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
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
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
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
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