Commit graph

71 commits

Author SHA1 Message Date
Olivier Teulière
14ce195e83 One more encoding fix. Hopefully the last one. 2010-01-24 00:53:21 +00:00
Olivier Teulière
41b0d38c8f Fixed encoding bugs for good, this time. 2010-01-23 23:34:48 +00:00
Olivier Teulière
51b0197afd Make the code more robust by catching std::exception instead of only GameException 2010-01-23 23:34:23 +00:00
Olivier Teulière
5e3a3b4ceb Fixed an encoding issue occurring on Windows when Qt is compiled without STL compatibility 2010-01-04 20:19:34 +00:00
Olivier Teulière
99573edcc4 Improved some strings 2010-01-02 11:30:20 +00:00
Olivier Teulière
854733fed2 Fixed a typo 2009-12-06 00:10:29 +00:00
Olivier Teulière
2eb28d61c5 Use expat instead of libxml2: it is much smaller, and is easier to use with Arabica when cross-compiling for Windows 2009-12-06 00:07:35 +00: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
eb22343932 Added a missing translation 2009-10-23 20:19:04 +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
8485e317b5 - Improved some strings
- Update of the French translation
 - Fixed make distcheck (compdic.cpp contains non-ascii chars)
2009-06-28 12:11:10 +00:00
Olivier Teulière
e42bc55965 Display the alternative inputs in the dictionary information tab 2009-06-28 11:47:50 +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
3a4daa844b Fixed tab order on the player widget 2009-06-26 21:27:13 +00:00
Olivier Teulière
adda457672 Use the display strings also when verifying a word and when listing the dictionary letters 2009-06-23 17:07:17 +00:00
Olivier Teulière
47e4b8c6b0 Simplifications 2009-06-23 12:56:40 +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
4d86e236e0 - Fixed an accelerator key in the English version
- Added a reference to the web site in the About box
 - Fixed an encoding problem on an error message
 - Explained better the error message saying to select a dictionary
2009-02-28 09:24:27 +00:00
Olivier Teulière
2ced8b3131 Changed slightly the behaviour of the coordinates arrow on a left click 2009-02-21 16:53:18 +00:00
Olivier Teulière
c6a799b24d Update of the French translation 2009-02-19 21:56:41 +00:00
Olivier Teulière
ed2a20a3e3 - Allow setting the coordinates of the played word by clicking on the board
- New PlayWordMediator class, to encapsulate the behaviour of the controls
   used to play a word
 - The Training mode now has input fields to play words directly, without
   choosing them in the search results
2009-02-19 18:25:17 +00:00
Olivier Teulière
8f72fd8152 - Always display characters in uppercase on the board (a lowercase character was still possible with a joker, in some rare cases)
- Fixed a compilation warning
2009-01-26 20:30:41 +00:00
Olivier Teulière
1df3c3ff51 Updated a few copyright dates 2009-01-24 17:44:56 +00:00
Olivier Teulière
7a5056354a - 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
2009-01-24 10:28:20 +00:00
Olivier Teulière
e085384e2f - Do not save the splitter position when no game is playing, because the position is not relevant without the players group
- Updated the French translation
2009-01-22 21:41:27 +00:00
Olivier Teulière
87e1d4795b Sorting the search results happens to be quite slow, often much slower than the search itself.
But we don't need to sort them all the time, and in general we don't even need to keep all the rounds.

This commit greatly improves the search performance by filtering the results in 3 different ways, depending on the context:
 - A limit to the number of results can be given (useful for the training mode). The kept results are the best ones, not the first ones found by the search.
 - When only the best round is needed (when the AI is playing with level 100, or when preparing the rack for an explosive game), we don't need to keep rounds with a lower score
 - When the AI has a level lower than 100, it is still possible to skip many rounds

The search limit in training mode is configurable (defaulting to 100) and can be deactivated.
2009-01-22 18:30:22 +00:00
Olivier Teulière
e83e4dcc99 - Use splitters to allow the user to resize freely the components of the main window
- Save splitters positions from one session to the next
 - Fixed default focus issues introduced in the previous commit
2009-01-15 20:22:11 +00:00
Olivier Teulière
d913be52a0 Support explosive games in the Qt interface 2009-01-15 18:33:32 +00:00
Olivier Teulière
229f1fcc14 - Removed the RACK_MANUAL enum value, and the obsolete Training::setRack() method
- qt/board_widget.cpp: cosmetics
2009-01-11 14:20:35 +00:00
Olivier Teulière
a4ae71d55d - TODO update
- Allow displaying letter points on the board with an option (on by default)
 - Fixed the tab order on the preferences window
 - Improved the behaviour and default size of the preferences window
2009-01-04 17:39:27 +00:00
Olivier Teulière
6a2eca1db1 New icons for the navigation actions, and additional ones for some menu items 2008-12-14 13:27:00 +00:00
Olivier Teulière
0e08cccd41 New preference, to allow linking the rack in training mode to the "Plus 1" dictionary tool 2008-12-14 13:20:38 +00:00
Olivier Teulière
97157b1716 Save the toolbar visibility from one session to the next 2008-12-08 21:38:12 +00:00
Olivier Teulière
846374e37b Allow deactivating the warning before replaying a turn 2008-12-08 21:37:02 +00:00
Olivier Teulière
c4f64c25e1 Improved confirmation dialogs 2008-11-30 21:09:09 +00:00
Olivier Teulière
81b44a8050 - When displaying an old turn, do not allow playing
- Turns start at 0 instead of 1, to indicate that nothing was played on the first turn
2008-11-30 21:08:29 +00:00
Olivier Teulière
59345dbbdf Fixed a crash when creating 2 games in the same session 2008-11-30 20:54:57 +00:00
Olivier Teulière
f6d7804847 - New PublicGame class, intended to be used by the interfaces instead of accessing Game directly
- Migrated the text, Qt and ncurses interfaces to the new PublicGame API.
2008-11-30 20:53:44 +00:00
Olivier Teulière
a79b71f028 When navigating in the history, display the current turn in the status bar 2008-11-30 20:51:05 +00:00
Olivier Teulière
fb4ea0e559 - The actions on the game history are now available in the menu and the toolbar
- The toolbar can be shown/hidden via a menu entry
 - Added icons for all the history actions
 - Ask for confirmation before replaying a turn
2008-11-29 16:40:59 +00:00
Olivier Teulière
675b534e77 - Fixed compilation in debug mode
- Centralized navigation in the game history in the Navigation class
 - The Qt interface now has (very) basic controls to navigate in the history.
2008-11-23 16:55:28 +00:00
Olivier Teulière
4b766d2622 - Bumped version to 1.8-cvs
- Improved the error message when the dictionary cannot be loaded at startup
 - Updated the french translation
 - Made some Game fields private
 - Added more constness
2008-11-22 14:40:25 +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
5ea1ec4215 Write a message in the status bar when a search is on going (training mode) 2008-11-04 21:31:13 +00:00
Olivier Teulière
003b403422 - dic_search.cpp: Do not add twice the same word in a 7+1 search (this can happen when using jokers)
- dic_tools_widget.cpp: Allow up to 2 jokers in the 7+1 search
2008-10-30 19:03:07 +00:00
Olivier Teulière
350666b568 - The last commit in cross.cpp fixed a bug but introduced another one, now both are fixed
- Added unit tests for both bugs
 - Fixed another bug preventing to enter some letters in the training rack
2008-10-15 19:43:23 +00:00
Olivier Teulière
0de2e6256f Small fixes here and there 2008-09-27 20:38:33 +00:00
Olivier Teulière
320c006827 Fixed an encoding issue 2008-09-23 17:26:19 +00:00