Commit graph

249 commits

Author SHA1 Message Date
Olivier Teulière
3d724166b6 Allow inserting and dropping a single command in the history. 2012-03-26 07:49:24 +02:00
Olivier Teulière
c37107ed87 Write more information in a saved game: dictionary info and move points 2012-03-22 08:46:21 +01:00
Olivier Teulière
b1e7381b39 Players can now have a table number 2012-03-19 22:49:58 +01:00
Olivier Teulière
f3b2442cc0 Arbitration: improved the refresh of search results 2012-03-17 23:53:40 +01:00
Olivier Teulière
3a8ac20a0a Arbitration: allow ending the turn even if some players have no assigned move 2012-03-17 23:53:31 +01:00
Olivier Teulière
bfab57f6ac Changed the way to re-assign a player move.
Re-assigning a move is not limited anymore to the last turn (only to the
current turn, and even that limitation could be removed without too much
work).
2012-03-14 20:40:23 +01:00
Olivier Teulière
435d3a2f42 New methods to replace a command in the current turn (even if it is not the last one) 2012-03-14 20:40:23 +01:00
Olivier Teulière
c9f61d7ac8 Search on the game rack, not on the player one 2012-03-11 16:59:16 +01:00
Olivier Teulière
0fa7bc91c6 Arbitration mode: allow editing the rack manually 2012-03-11 00:24:29 +01:00
Olivier Teulière
25a36ec9cd Arbitration mode: allow setting the rack randomly 2012-03-11 00:24:21 +01:00
Olivier Teulière
9c82c8f7bc Reset the master move before setting the racks, for a better behaviour at the end of the game 2012-03-11 00:23:39 +01:00
Olivier Teulière
cf6cec0527 Improved the findMatchingCmd() method 2012-03-10 18:06:41 +01:00
Olivier Teulière
9160e6bc99 New preference to save the search results limit in arbitration mode 2012-03-10 18:06:41 +01:00
Olivier Teulière
05a51101db New arbitration mode, dedicate to arbitration of duplicate games.
It is mostly working, but many things are still missing.
In particular:
 - ability to enter (or change) moves for a past turn
 - ability to change the rack (manually, or randomly)
 - ability to add/remove players during the game
 - support for solos, warnings, penalties
 - support for table number
 - more ergonomic interface
 - non regression tests
 - ... and probably bugs to fix
2012-03-10 18:06:41 +01:00
Olivier Teulière
f44048f31a New utility method to find a matching command 2012-03-06 08:56:03 +01:00
Olivier Teulière
d5c53b92d0 New Round::countJokersFromRack() utility method 2012-03-04 22:58:53 +01:00
Olivier Teulière
22fd6484f3 Correctly retrieve the game rack 2012-02-25 23:51:30 +01:00
Olivier Teulière
4077a25fa0 Use the GameMoveCmd command 2012-02-25 23:25:40 +01:00
Olivier Teulière
df806594ae New GameRackCmd class, not used yet 2012-02-25 23:17:04 +01:00
Olivier Teulière
f1c8bd587b Really fixed detection of the first turn (commit 43954a9 was wrong) 2012-02-25 23:17:04 +01:00
Olivier Teulière
43954a9fe5 Fixed detection of the first turn 2012-02-25 21:56:41 +01:00
Olivier Teulière
182263ce74 New UndoCmd class, not used yet 2012-02-21 08:22:33 +01:00
Olivier Teulière
b1ed3215d9 Rewrote the navigation system, to make it more powerful and easier to understand.
Internally, commands are now stored a bit differently: some commands
which were at the end of a turn (like the players rack in duplicate
mode) are now at the beginning. But from a user point of view, there is
no visible difference, except some details in training mode (and the new
behaviour is arguably better :)).
Only (known) problem: after loading a game saved before this commit,
navigating in the game history may be less nice (in particular, racks
may not be fully restored).
2012-02-21 08:22:33 +01:00
Olivier Teulière
e915e5f2cf New "auto-executable" flag for commands, not yet used 2012-02-21 08:22:33 +01:00
Olivier Teulière
de2d2777e2 The TurnCmd class does not inherit from Command anymore 2012-02-21 08:22:33 +01:00
Olivier Teulière
59fac223f4 Renamed some methods 2012-02-21 08:22:32 +01: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
6e2c665bdf Simplify the handling of jokers in the Round class.
This also fixes a very old (but minor) bug: when a word containing a
joker was played "manually" (i.e. not via a round generated by the
Results class but via the Game::checkPlayedWord() method), subsequent
search results using this joker on the board would display it as a
joker, not as a normal tile.
2012-02-21 08:22:32 +01:00
Olivier Teulière
b855c5f64e Simplify slightly the Round API 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
0ae77a659e Cosmetics 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
16a9a9b1a9 Removed Game::setTestTound() and Game::removeTestRound().
They are still available via the PublicGame class for interfaces.
2012-02-19 13:07:29 +01:00
Olivier Teulière
24d601543a Removed a useless include 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
684880acbe Moved debug.h to dic/ 2012-02-19 13:07:29 +01:00
Olivier Teulière
5d98402891 Changed the prototype of PlayedRack::getRack() (and similar methods) 2012-01-26 21:10:41 +01:00
Olivier Teulière
e09f7f675e When all the moves are invalid for a turn, play the master move anyway 2012-01-17 23:49:09 +01:00
Olivier Teulière
13f4a3c346 Use the master move.
When no master move is defined, define a valid one using the best played
move (or the best playable move if all the played moves were invalid).
2012-01-17 23:35:16 +01:00
Olivier Teulière
1bc9c2f0f1 Implement (de)serialization of the MasterMoveCmd class 2012-01-17 23:15:05 +01:00
Olivier Teulière
744e90e6ca New command to define a master move. 2012-01-17 23:15:05 +01:00
Olivier Teulière
e327d4605d Always consider that the played move was played by the first player.
Knowing the actual player is not always possible, since potentially none
of the players has found the played move (for example in arbitration
mode). This ID is now only used to retrieve the rack from which the move
was formed, so any player ID will do.
The non-regression tests have been adapted accordingly.
2012-01-17 21:57:03 +01:00
Olivier Teulière
c81df46b5e Added a new type of move: NO_MOVE 2012-01-17 00:56:02 +01:00
Olivier Teulière
d32f3fdf81 Use assertions where appropriate 2012-01-17 00:56:02 +01:00
Olivier Teulière
482b5d674f Previewing a Round is now possible in all the game types.
It was only possible in Training mode. This change will be useful for
the future arbitration mdoe.
2012-01-17 00:43:19 +01:00
Olivier Teulière
90ce7e1111 Removed some useless code 2012-01-12 15:26:27 +01:00
Olivier Teulière
413d93c7cb Remove debug not meant to be committed. 2012-01-12 15:14:23 +01:00