Olivier Teulière
cd34ce6d32
XmlWriter: avoid a division by zero
2013-04-03 21:56:53 +02:00
Olivier Teulière
8437316c36
Topping: give a default empty move to the player.
...
This avoids a crash if the player uses hints at the first turn.
2013-04-03 21:56:46 +02:00
Olivier Teulière
d897b05c52
Hints: add missing logging
2013-03-30 19:29:39 +01:00
Olivier Teulière
7c7e26cc16
Hints: fix a bug in WordLettersHint.
...
The letters of a word containing digraph tiles (like the Catalan 'QU')
were sorted incorrectly. For example, "AQUIETE" was sorted as "AEEIQTU"
instead of "AEEITQU".
Note: it would be even better as "AEEIQUT", but this is a different
problem...
2013-03-30 19:25:53 +01:00
Olivier Teulière
cdbb53f72c
Gray out the players area when the game is finished.
...
This was broken since 196e02f9ad
.
2013-01-29 22:58:00 +01:00
Olivier Teulière
7dda601599
MoveSelector: add one more heuristic (deactivated for now)
2013-01-19 00:36:08 +01:00
Olivier Teulière
a53d99a8d3
MoveSelector: add another heuristic
2013-01-19 00:36:08 +01:00
Olivier Teulière
075dbaa2fb
MoveSelector: add a new heuristic (deactivated for now)
2013-01-19 00:36:08 +01:00
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
7923ed2c2a
Remove a useless include
2013-01-19 00:36:07 +01:00
Olivier Teulière
30385abe30
Results: new MasterResults implementation, using the MoveSelector class.
...
This avoids calling MoveSelector everywhere in the code.
2013-01-19 00:36:07 +01:00
Olivier Teulière
adc60c868f
Settings: fix a typo (wrong setting type)
2013-01-19 00:36:07 +01:00
Olivier Teulière
33214c62b2
Rack: add a contains() convenience method
2013-01-17 17:59:33 +01:00
Olivier Teulière
b493b3b365
Rack: rename a method
2013-01-17 17:59:33 +01:00
Olivier Teulière
ac3cc02be4
Rack: rename a member variable
2013-01-17 17:59:33 +01:00
Olivier Teulière
a13f7d2968
Bag: add a contains() convenience method
2013-01-17 17:59:28 +01:00
Olivier Teulière
bfcc7a80c6
Bag: the number of tiles cannot be negative
2013-01-17 17:21:33 +01:00
Olivier Teulière
3caacd9c84
Bag: remove a useless method
2013-01-17 17:19:41 +01:00
Olivier Teulière
6dc05081b0
Bag: rename a member variable
2013-01-17 17:19:41 +01:00
Olivier Teulière
c1c3f3b48b
Bag: rename a method
2013-01-17 17:14:38 +01:00
Olivier Teulière
664eec36ed
New MoveSelector class, to help find the "best" move to play.
...
The best move has the highest possible score, but it is also the one
leading to the most interesting game. This is a subjective notion, but
some heuristics can help, such as:
- a move sparing a blank is better than one using it
- a move with many prefixes and suffixes is better than one without
extensions
- a move "opening" the game is better than one blocking it
- a move leaving a nice rack is better than one leaving "bad" letters
At the moment, only the first heuristic is implemented.
2013-01-16 19:00:01 +01:00
Olivier Teulière
4e533eed27
Fix a small bug in explosive games.
...
Before this commit, if the top move did not need the blank tile, the
blank tile stayed in the rack. It is now replaced with another (randomly
selected) tile.
2013-01-16 18:04:57 +01:00
Olivier Teulière
83baec368b
Topping: give the score penalty directly with the player move.
...
This commit also adds a setting to disable the elapsed-time penalty.
2013-01-16 17:46:47 +01:00
Olivier Teulière
cdcb5c25b7
TurnData: remove the m_playerId member
2013-01-16 14:40:34 +01:00
Olivier Teulière
1e0de63ef8
Results: add a isEmpty() method, and use it where possible
2013-01-16 11:15:12 +01:00
Olivier Teulière
89b5f757ca
Topping: do not assign an empty move to the player immediately.
...
It is now done only after a timeout, to avoid the need to replace
this empty move when the player finds a top move.
2013-01-15 11:43:30 +01:00
Olivier Teulière
ec0cfb47fa
Topping: add a preference to set the penalty value in case of timeout
2013-01-14 17:13:48 +01:00
Olivier Teulière
7e9dab2e9b
Topping: keep track of the player score
2013-01-14 17:13:48 +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
4111afc04c
RackWidget: after a drag & drop, notify the game that the rack has changed.
...
This allows synchronizing all the controls displaying the player rack
(visual and textual ones).
2013-01-09 18:56:25 +01:00
Olivier Teulière
7a6ca367fb
Game: remove a TODO
2013-01-09 18:52:11 +01:00
Olivier Teulière
0cdc2b7ab4
Rack: add operator==()
2013-01-09 18:52:11 +01:00
Olivier Teulière
7cd6313dac
Topping: integrate hints
2013-01-08 16:04:24 +01:00
Olivier Teulière
b5d175fc5b
Topping: use a different method to play the move.
...
This allows providing additional time information
2013-01-08 16:04:23 +01:00
Olivier Teulière
3f19d6ae49
Hints system, to retrieve partial information about a Move.
...
This is only the core part, no interface integration is done yet.
2013-01-08 16:04:23 +01:00
Olivier Teulière
fcb9fa572a
Game: make the constructor protected, to make the design clearer
2013-01-08 15:55:59 +01:00
Olivier Teulière
f1c2d3951d
GameFactory: remove the useless releaseGame() method
2012-12-30 16:38:07 +01:00
Olivier Teulière
76fefdf71d
New "master game" feature.
...
When a master game is defined, the racks and moves played from the
current game will be the same as in the master game. This can be
practical to replay a game in a different mode, or to replay at home a
duplicate game played in a club, for example.
2012-12-30 16:38:07 +01:00
Olivier Teulière
86ed14f75e
Move: add operator==()
2012-12-30 16:13:45 +01:00
Olivier Teulière
62d46c875f
Round: add operator==()
2012-12-30 16:13:31 +01:00
Olivier Teulière
ac0abba535
Topping: new widget dedicated to topping mode.
...
It is currently very ugly, and quite buggy...
2012-12-29 19:36:38 +01:00
Olivier Teulière
57a2c0690f
Topping: keep track of all the moves played by the player.
...
The timing information is currently not used at all.
2012-12-29 17:51:52 +01:00
Olivier Teulière
681a7b28cb
New topping mode (very beginning)
2012-12-29 17:51:16 +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
c138947138
Move Duplicate::setGameAndPlayersRack() to Game
2012-12-29 17:49:25 +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
8d85df630b
PlayModel now uses a Move internally
2012-12-29 17:46:18 +01:00
Olivier Teulière
8acebbc889
Game::checkPlayedWord() now takes a Move instead of a Round
2012-12-29 17:46:18 +01:00
Olivier Teulière
dc3535c953
Coord: do not refuse lowercase coordinates.
...
It fixes a regression introduced in bedcc56
.
2012-12-29 17:46:17 +01:00