Olivier Teulière
687a31bee8
The AI passes instead of changing letters when it has nothing to play
2008-11-30 21:09:37 +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
06dd7dff71
Removed Game::back()
2008-11-30 21:07:19 +00:00
Olivier Teulière
67306bec3e
Added auto-execution of commands when clearing future commands.
...
The goal is to automatically replay commands involving AI, so that the user cannot be 'blocked'.
2008-11-30 20:55:45 +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
d4f4646b4f
Get rid of Duplicate::prevHumanPlayer() and Duplicate::nextHumanPlayer() + cosmetics
2008-11-30 20:51:42 +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
c430d712b8
Improved debugging
2008-11-23 20:13:02 +00:00
Olivier Teulière
13f2e8daad
- Really fixed duplicate games when noone plays a valid move
...
- Added a unit test to ensure it
- Fixed Game::back() (this fixes some unit tests broken by a previous commit)
- Added a unit test for a duplicate game with only one player
2008-11-23 18:18:02 +00:00
Olivier Teulière
fa225881c0
Do not allow navigating before the first turn, and do not count an empty turn as a real one when navigating.
...
The navigation in the history is now more natural.
2008-11-23 17:08:12 +00:00
Olivier Teulière
8e7c61e2d8
New command to handle changes of the current player. This fixes history navigation in free game mode
2008-11-23 17:07:42 +00:00
Olivier Teulière
e8cd922186
New Duplicate::MarkPlayedCmd command to change the "hasPlayed" status of a player, in duplicate mode
2008-11-23 17:06:44 +00:00
Olivier Teulière
9dc84ed963
- Duplicate: end turns after defining the new rack, not before
...
- FreeGame: create an additional turn after defining the initial rack
2008-11-23 17:05:13 +00:00
Olivier Teulière
b5c63ea6e3
Removed the useless return value of Game::start()
2008-11-23 17:04:40 +00:00
Olivier Teulière
40d25bd63a
Handle the case when all players play an invalid move
2008-11-23 17:03:29 +00:00
Olivier Teulière
53cccd529e
Added toString() methods to the commands to ease debugging
2008-11-23 17:02:33 +00:00
Olivier Teulière
7fa8c2b58f
Removed experimental support of the real bag. It was not a good idea after all...
2008-11-23 16:58:31 +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
bce4ce4604
- The main game modifications (playing a move, setting a new rack, ...) are now done using the Command design pattern, which alows undoing these changes easily.
...
- Added support for navigation in the game history to the text interface (not unit-tested yet)
2008-11-23 08:18:03 +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
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
e3ef487ebb
Sort the search result in a predictible way. The unit tests have been adapted accordingly.
2008-10-16 17:51:16 +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
fa5d97f942
- Be slightly more tolerant in release mode
...
- Prepare for release 1.7
2008-09-25 20:39:37 +00:00
Olivier Teulière
9498d044f8
- Install a desktop file to get an entry in the applications menu on Linux (works on both Gnome and KDE)
...
- New (optional) dependency on the libconfig library, to save/load configuration files.
- On Unix, the location of the configuration file respects the XDG Base Directory Specification.
- The contrib system automatically fetches and builds libconfig for Windows cross-compilation
- Fixed make distcheck
2008-09-22 21:21:38 +00:00
Olivier Teulière
a9626975e0
- Support shuffling the rack of the current player
...
- More intuitive players management (in particular when there are several
human players)
2008-09-14 17:56:18 +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
0696a1b4a2
Qt interface:
...
- Be more explicit if the dictionary name is missing
- Changed the colour of the joker on the board, instead of displaying it in lower case
- Incorrect words are now refused by default
- Changed the way words are input: the case is no longer relevant,
and the coordinates are in a separate control
- Explain the problem when a word is refused
- Updated the French translation
2008-09-07 21:06:17 +00:00
Olivier Teulière
990f4c5212
Qt interface:
...
- Initialize the random numbers generator, and print the seed value
- Handle properly Qt builds without STL support
- Save the position of the main window
- Got rid of the useless toolbar
- Better size of the preferences dialog
- Hopefully fixed translation issues on Windows
- The Settings class throws an exception when asked for a non-existing setting
2008-09-05 21:31:30 +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
fa493d4135
Fixed a warning
2008-07-27 15:26:15 +00:00
Olivier Teulière
7ea51d2f23
Compilation fixes for some systems (missing headers)
2008-07-20 12:15:51 +00:00
Olivier Teulière
597673e8e5
Fixed an invalid read when sorting the search results and adapted regression scenarii
2008-07-04 19:03:12 +00:00
Olivier Teulière
cc70ccabef
Fixed typos
2008-07-03 20:14:46 +00:00
Olivier Teulière
c7f85ce151
- Search results with the same score are now sorted alphabetically
...
- Adapted test scenarii for the new order of results
2008-03-03 22:13:58 +00:00
Olivier Teulière
0acc5cd48f
Do not try to complete the rack when no letter was removed
2008-02-12 21:02:39 +00:00
Olivier Teulière
52b7363888
Players are not created by the Game object anymore but by the user of the class.
...
This allows more flexibility, in particular to choose the type of player or its name.
2008-01-28 19:17:33 +00:00
Olivier Teulière
d8780822c2
- Fixed a bug due to the reject sign '-' preventing to load a saved training game
...
- Qt interface: Loading and saving a game is now supported (it only works in
training mode, due to limitations in the core)
2008-01-26 10:10:50 +00:00
Olivier Teulière
0a4b342f78
- Players can now have a name
...
- Use player names in the ncurses interface
- In training mode, create the hidden player in the constructor, not in start()
- When the AI has nothing to play, change the letters instead of simply passing
- New Makefile to build the win32 dependencies automatically (INSTALL file updated)
2008-01-19 19:33:08 +00:00
Olivier Teulière
8c3708fa99
- Removed Game::setRackRandomOld() (replaced by Game::setRackRandom())
...
- Adapted regression scenarii
2008-01-15 14:56:38 +00:00
Olivier Teulière
572b31c64e
- dic/encoding.cpp: simplification (this also removes a warning)
...
- game/rack.*: added a missing const
- game/game_io.cpp: fixed a compilation warning
2008-01-11 10:09:26 +00:00
Olivier Teulière
7e7f7f2dfa
- wxwin/mainframe.cc: Fixed a crash occurring when no config file is found
...
- Fixed a bug occurring in duplicate mode: sometimes the game ended too early,
while it was still allowed to go on.
Also updated the corresponding regression scenario
2008-01-10 10:23:36 +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
ba230eda60
- Bumped version number to 1.6
...
- Used the -Wall option of automake, and fixed the reported warnings
- Updated french translation
2008-01-08 16:09:08 +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
5199b6b7c1
Cosmetic changes
2006-12-23 16:48:15 +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
Olivier Teulière
9949225b8b
Fixed a nasty bug, due to the way jokers are handled
2006-11-05 17:04:39 +00:00
Antoine Fraboulet
5b8cbbe680
- correct typo on alignment
2006-11-05 13:31:49 +00:00
Antoine Fraboulet
ec3a91e444
- _wtoi correction
2006-11-05 13:30:54 +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
69dada550b
- add "load" in game_factory
2006-08-11 22:14:21 +00:00
Antoine Fraboulet
8d79f6ba78
- typo in declaration
2006-08-11 22:13:41 +00:00
Antoine Fraboulet
9f86b53021
- add debug strings
2006-08-11 22:13:02 +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
bb5a17d0f1
Indentation
2006-01-22 20:48:17 +00:00
Olivier Teulière
77be2e9219
Backport of the 'multibyte' branch on HEAD.
2006-01-22 12:23:52 +00:00
Olivier Teulière
2799f5191e
Use forward declarations to reduce dependencies
2006-01-02 19:05:37 +00:00
Antoine Fraboulet
4665fa176b
- add comments and emacs mode
2006-01-01 19:49:35 +00:00
Antoine Fraboulet
55badf52e4
- correct helperSetRackRandom with RACK_ALL (replace tiles in bag)
...
- add game_io.cpp to load/save a game
2006-01-01 19:48:36 +00:00
Antoine Fraboulet
5bdca9e9fd
- pldrack.h
...
add comments and emacs mode
add modes for toString
- pldrack.cpp
add modes for toString
add bool "reject", should be used later to notify a reject during game
add setRack(string)
2006-01-01 19:47:26 +00:00
Antoine Fraboulet
63005cdddb
add comments and emacs mode
2006-01-01 19:47:03 +00:00
Antoine Fraboulet
fee2ddff8f
- revert dic_chr patch. make dic_char instead.
2006-01-01 19:37:57 +00:00
Antoine Fraboulet
fea2ba6068
- correct off by one in score, once again. index+1 is right !
...
- revert previous dic_chr patch. make dic_char instead.
The board should/will use codes instead of tiles for performance reasons
in the next version
2006-01-01 19:37:26 +00:00
Antoine Fraboulet
2c262bcc34
Game load/save handling
2006-01-01 19:36:16 +00:00
Olivier Teulière
3ecf740432
- do not use std:: everywhere, it justs makes the code harder to read
...
- history.h: use forward declarations to reduce dependencies
- history.cpp: fixed a compilation warning
2005-12-27 16:54:38 +00:00
Olivier Teulière
9aeeafa61b
Removed the useless Game::getPlayerRack() method
2005-12-27 15:01:07 +00:00
Olivier Teulière
af720a02ee
- Commented out some debug messages preventing the regression to work properly.
...
- Re-indented a few lines to remove tabulations and keep a consistent coding style
2005-12-27 13:11:17 +00:00
Antoine Fraboulet
fc157bc08f
- correct bug in Game::back
...
- add regression test for this case
2005-12-27 01:06:54 +00:00
Antoine Fraboulet
d3e9d1e0ac
- off by one in History. corrected. all regression tests ok.
...
Scenario: training_dict
Scenario: training_bag
Scenario: training_search
Scenario: training_play
Scenario: duplicate_2_ai
Scenario: freegame_passing
Scenario: freegame_change
Scenario: freegame_3_ai
Summary: Everything was OK.
2005-12-27 00:06:23 +00:00
Antoine Fraboulet
4c56636aef
- use History class
...
- back is still buggy
2005-12-26 22:58:58 +00:00
Antoine Fraboulet
4881a63f75
- use History class
2005-12-26 22:58:19 +00:00
Antoine Fraboulet
1ea7bbaf9e
- comment update
2005-12-26 22:57:44 +00:00
Antoine Fraboulet
e25d5825a6
- add toString
2005-12-26 22:56:40 +00:00
Antoine Fraboulet
061242ed15
- correct empty round to have valid coord
2005-12-26 22:55:26 +00:00
Antoine Fraboulet
712ddb5125
- use of History class
2005-12-26 22:54:02 +00:00
Antoine Fraboulet
3f4c290745
- modified to use History
...
- add setRack wrapper for both manual and random
2005-12-26 22:53:26 +00:00
Antoine Fraboulet
28fcd062bf
- add toString method
2005-12-26 22:52:38 +00:00
Antoine Fraboulet
3bde5c3da5
- since we use History, the first round is numbered 1
...
- separate sort_by_points method, removed call from board_search
2005-12-26 21:22:21 +00:00
Antoine Fraboulet
1fb948cba9
- player now use History class for turn storage
2005-12-26 21:18:21 +00:00
Antoine Fraboulet
74900ca592
- add simple printout debug msg
2005-12-26 21:10:59 +00:00
Antoine Fraboulet
7bc239adfc
- add toString() method
2005-12-26 21:08:08 +00:00
Antoine Fraboulet
159cb33b75
- add history.[h|cpp]
2005-12-26 20:13:02 +00:00
Antoine Fraboulet
91442662d0
- fixed typo
2005-12-26 19:43:21 +00:00
Antoine Fraboulet
9fa76dda0e
Makefile.am
2005-12-26 19:19:42 +00:00
Antoine Fraboulet
983d413a3b
- adding empty constructor for History
2005-12-26 19:17:49 +00:00
Antoine Fraboulet
504198b8ff
- adding shortcut for getCurrentPlayer()
2005-12-26 18:09:52 +00:00
Antoine Fraboulet
f3ee945b91
- remove results members access methods from Training Class
...
- add m_testPlay for temporary placed words
2005-12-26 18:07:26 +00:00
Antoine Fraboulet
9b9fcfae4c
- re-enabling toString()
2005-12-26 15:53:37 +00:00
Antoine Fraboulet
ce001c7aa2
- adding getWord and toString methods
2005-12-26 15:52:48 +00:00
Antoine Fraboulet
3c31b8a2e2
- backport modifications from branch
2005-12-26 15:33:15 +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
5f74291e5c
Fixed a typo in a comment
2005-12-23 22:19:22 +00:00
Olivier Teulière
777a6a5e8c
The constuctors of the players now take as argument the ID of the player
2005-11-06 17:13:45 +00:00
Olivier Teulière
9e5b6e8ebf
Use Turn objects for the players history too
2005-11-06 14:53:15 +00:00
Olivier Teulière
966418bf98
Typo
2005-11-06 01:09:41 +00:00
Olivier Teulière
4cef120cce
Minor factorization, and avoided another copy of PlayedRack
2005-11-06 01:05:06 +00:00
Olivier Teulière
d64e22dc6b
Fixed a typo and avoided a useless copy
2005-11-06 00:38:16 +00:00
Olivier Teulière
26b446f62b
Simplification in the PlayedRack history at Player level
2005-11-05 23:57:41 +00:00