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
Olivier Teulière
f2d25bc0d6
Include config.h before checking macro definitions
2012-01-05 20:43:57 +01:00
Olivier Teulière
9aea22d968
Use an enum for the variants
2011-08-28 19:25:26 +02:00
Olivier Teulière
56b66fea28
Added setters to GameParams, to simplify the code a little
2011-08-28 19:25:26 +02:00
Olivier Teulière
befe577fe7
Got rid of Game::getModeAsString()
2011-08-28 19:25:26 +02:00
Olivier Teulière
17bdd27899
Moved the dictionary to the GameParams class
2011-08-28 19:25:26 +02:00
Olivier Teulière
408c92df42
Moved the game mode to the GameParams class
2011-08-28 19:25:26 +02:00
Olivier Teulière
3d48facb55
Cosmetics
2011-08-28 19:25:26 +02:00
Olivier Teulière
d6fbd6bef1
Allow combining several variants in a single game
2011-08-28 18:47:25 +02:00
Olivier Teulière
38f3a456bb
Handle the "7 among 8" variant in a few more places
2011-08-28 15:52:12 +02: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
3b4750d3bf
Round: the m_bonus field should be of type bool, not int.
2011-08-27 21:55:49 +02:00
Olivier Teulière
cfa88072a3
Replace the use of convertToMb() and convertToWc() with macros
2011-07-30 19:48:05 +00:00
Olivier Teulière
9e71372c42
Simplified the readFromUTF8() prototype
2011-07-30 19:46:47 +00:00
Olivier Teulière
424fd3af32
Display the points of the word entered by the player before validating it.
2011-07-16 23:31:17 +00:00
Olivier Teulière
23771f3f71
Indicate the end of the game
2011-01-30 00:23:45 +00:00
Olivier Teulière
7bb432b954
Removed a useless include
2011-01-29 23:50:14 +00:00
Olivier Teulière
0c76b9d781
Simplified the looging macros, and added logs in various key places.
2011-01-29 23:47:20 +00:00
Olivier Teulière
e175a6d8bc
Added a new (optional) dependency on log4cxx, to enable logging.
...
If disabled (the default), everything is compiled away.
2011-01-16 21:30:30 +00:00
Olivier Teulière
c3785555b9
Print to stderr the complete stack trace in case of exception or segmentation fault.
...
This feature will only be activated in debug mode, and if available on the platform.
The symbols will even be demangled if possible (i.e. if compiled with g++).
2010-10-17 21:23:39 +00:00
Olivier Teulière
b7fff8b4a1
- Removed various C-style casts
...
- Factorized code in the Bag class
2010-03-06 16:54:20 +00:00
Olivier Teulière
5642bfa191
Fixed loading of games, for languages with multichar letters like Catalan
2010-03-06 16:53:37 +00:00
Olivier Teulière
7dcd9898ed
Fixed a bug in PercentResults: AI players with a level lower than 100 could still play as if they were (almost) at level 100!
2010-02-20 13:31:12 +00:00
Olivier Teulière
65ae7075fd
Make the destructor of the parent class virtual, since the class has virtual methods
2010-01-28 22:24:11 +00:00