Andy2
86d5778ec3
remove 16x16 limitation on board size, replacing with 32x32. Change
...
is enabled by a compile-time flag so Android needn't follow yet.
2011-11-14 18:21:41 -08:00
Eric House
cee738942e
back out earlier change using redo: it was broken. Add assert to
...
catch problem with passing ptr to tiles as src of tiles.
2011-11-10 18:26:32 -08:00
Andy2
43a79a0b47
use undo/redo rather than copying stack to figure past move score.
...
This may have been contributing to crashes, but the new code's more
effecient anyway.
2011-11-10 06:52:33 -08:00
Andy2
8d228ae190
turn on face-up tile picking for Android (though there's no prefs UI
...
to enable it for a game yet). In common code, break pick tile utils
method in two, one for blank and the other for tray tiles. In java,
implement dialog for picking the tiles. Works, though is a bit clumsy
to have the dialog come and go after every pick. Better would be a
dialog that stays up and accumulates picks -- but it'd have to know to
reduce the set of tile choices as letters are chosen. This'll do for
now.
2011-10-28 22:15:56 -07:00
Andy2
4eee7f8aa7
Pass selected tiles into new util function, and from there into java
...
world, so confirming query can include them.
2011-10-19 18:34:26 -07:00
Andy2
b31e829414
Remove file-format differences between debug and non-debug versions.
...
Fix curses to compile non-debug.
2011-10-18 18:52:37 -07:00
Andy2
235259ef45
a bit more tuning of model_listWordsThrough()...
2011-10-17 18:26:04 -07:00
Andy2
3b7532aba8
improve stack_redo() to return the redone move, and use that to avoid
...
making a copy of the move stack in model_listWordsThrough()
2011-10-17 18:16:19 -07:00
Andy2
9109396ae9
in model_listWordsThrough, only undo as much as needed to find the
...
move tile that places a tile on the cell we're interested in.
2011-10-17 06:48:59 -07:00
Andy2
6793742f0f
remove option to list all words played in a single lookup dialog, and
...
supporting code in the jni/common C.
2011-10-14 22:32:30 -07:00
Andy2
0e6b4d749f
When pen held on committed tile on board, cons up list of all words
...
played that include that tile and pass to new util_cellSquareHeld()
method. In java implementation of that method, use existing lookup
activity code to display list of words. Enabled on the C side by a
compile-time flag in case it has problems. Right now the time spent
saving a game before launching the lookup activity, and reloading it
after, is pretty apparent, but that's in emulator which is slow.
2011-10-13 19:14:08 -07:00
Eric House
f86b0dfcc5
fix to compile on x86 (with newer compiler that doesn't like unused variables)
2011-10-10 22:42:02 -07:00
Andy2
d5ca5bbd0d
remove misplaced assert: in network games illegal words may well
...
arrive.
2011-10-10 06:48:07 -07:00
Andy2
dc20b04a4c
remove unused param (on the C/jni side)
2011-10-04 18:54:53 -07:00
Andy2
3cf1d07df3
optimization: set up word-tracking invariants on init rather than each
...
time used
2011-10-04 06:21:02 -07:00
Andy2
77b9fa11a5
improving lookup words experience: replace
...
util_userQuery(QUERY_ROBOT_MOVE) with new util_informMove(), into
which the number of words formed and the words themselves are passed.
The process of consing up the score explanation was already passing
over the model, so storing the words is very little effort, and will
save a call back into the model where the user actually wants to do
the lookup.
2011-10-02 16:21:09 -07:00
Andy2
35a0a3a291
passing pool into word-listing code a mistake as it put tiles back
...
when undoing and so the pool grew each time. Fix, and remove server
API as it's unneeded.
2011-09-22 06:41:48 -07:00
Andy2
26ce5a119a
in model_getWordsPlayed, make '\n' a separator rather than a
...
terminator. Makes it easier to split in the Java world without
getting an extra empty word.
2011-09-18 19:05:00 -07:00
Andy2
9eacdb3856
add server_listWordsPlayed, and implement via function in model.c that
...
uses existing stack and undo features to run a WordNotifierInfo over
some number of scoring passes to gather the words seen. Seems to work
as tested from gtk version. Now need to try from android....
2011-09-18 17:20:01 -07:00
Andy2
e4b952222a
unify two ways of saving words encountered during scoring, removing
...
one and changing the site that used it to use the other. Not visible
outside of common, but should make it easier to harvest a list of all
words for one move or the entire game.
2011-09-02 19:11:04 -07:00
Andy2
ecaca66a96
move turn-in-range assert to where it won't fail
2011-07-19 06:17:50 -07:00
Andy2
5deb68486c
add a ton of asserts (no code change otherwise)
2011-07-18 06:44:17 -07:00
Eric House
3cc105da0b
add ability to dump board (model) as text, protected by ifdef that
...
will likely only get set on Linux. Uses lower-case to designate
blanks. For that and maybe string size assumptions is very broken for
non-ascii languages, including Spanish.
2011-04-13 06:45:22 -07:00
Eric House
c77d3039cc
add XP_FREEP. Should be no change in behavior.
2011-04-07 18:07:45 -07:00
Andy2
3b7b4802a9
add ability to specify, track and use separate dictionaries for each
...
player. Works for gtk client. Compiles for Android but there's no UI
yet to specify more than one dict. Management of dupicate dicts
without duplicating memory -- refcounting -- will be up to the
platforms.
2011-04-01 19:57:10 -07:00
Andy2
8a7029435c
fix some comments
2011-02-01 18:55:48 -08:00
Andy2
92940e6638
add model_getNPlayers()
2010-11-19 18:22:39 -08:00
Andy2
8c7043d42c
fix crash using undo/redo after a turn has overwritten pending tiles:
...
when redoing need to check that cell is still empty.
2010-10-29 20:07:09 -07:00
Andy2
5b33df4e25
modify model_getTile to take NULL for out parms where the result is
...
often ignored, then pass NULL instead of the address of variables
called 'ignore'. Should be no behavior change.
2010-10-29 19:52:15 -07:00
Eric House
b878599f7b
remove comment
2010-10-26 20:57:27 -07:00
Andy2
d67e421541
get rid of excess logging
2010-07-27 21:36:14 -07:00
Andy2
40323b03d2
board_canFlip -> board_visTileCount
2010-07-08 06:38:51 -07:00
Andy2
c98451c62a
remove excess logging
2010-07-07 06:50:47 -07:00
Andy2
5f92491ca3
add and implement board_canTogglePending
2010-07-03 11:38:37 -07:00
Andy2
d44b9907cf
save redoable pending tiles -- and up stream version since format's
...
changed
2010-07-03 11:25:01 -07:00
Andy2
57e246da3b
handle blanks as well in redo of undone pending tiles
2010-07-02 22:44:50 -07:00
Andy2
f77cf0e23d
add board_redoReplacedTiles and model_redoPendingTiles. The latter
...
works as long as no blanks are involved. And new state isn't being
saved so will be lost unless format changed.
2010-07-02 18:52:55 -07:00
Andy2
491cfe7616
add board_canShuffle and implement
2010-07-01 18:55:49 -07:00
Andy2
43c34aa466
add board_canFlip and model_canFlip -- which seem to work though
...
there's no test that when a single tile is on the board it's not in
the middle. Sue me.
2010-06-30 20:25:34 -07:00
Andy2
e0dd3701a0
Add model_sortTiles(); use it; fix some comments and const decls.
...
Sorting always happens now when tiles added; needs to be based on a
preference.
2010-06-17 06:43:16 -07:00
eehouse
ef15f50edf
add model_getNMoves
2010-03-13 23:09:53 +00:00
ehouse
edde3e2fd5
cleanup
2009-09-26 14:33:52 +00:00
ehouse
669e423ca8
Use new dict API to get rid of XP_UCHAR4 type, replacing with const XP_UCHAR*.
2009-04-07 04:23:56 +00:00
ehouse
641ae18864
Use new dict api to support utf8 faces.
2009-04-05 19:20:22 +00:00
ehouse
926f5963a3
rename only: stream_putString to stream_catString.
2009-03-29 18:26:59 +00:00
ehouse
21f5f329a0
Get rid of bogus assert
2009-01-14 13:02:38 +00:00
ehouse
c731e0d231
Remove newlines from debug statements.
2009-01-05 01:59:04 +00:00
ehouse
5cb97bf636
New Ubuntu has a stricter compiler...
2008-11-06 03:16:09 +00:00
ehouse
61a3602dc5
Don't save dict as part of model. It's redundant as the platform code
...
already saves the name and passes the dict in.
2008-09-09 12:18:32 +00:00
ehouse
36627fb051
Add listeners to model so board can be notified whenever dictionary
...
changes. Pass dict into draw via new API, removing it from the
draw_begin calls.
2008-09-05 12:11:37 +00:00
ehouse
2905af749e
Fix crasher: don't start a board-scroll operation and attempt to end
...
by dropping a tile. (This part is to detect that no drag actuall happened.)
2008-06-07 23:07:31 +00:00
ehouse
f749fdd560
Remove all tabs. No code changes.
2008-05-31 03:26:16 +00:00
ehouse
ebad668227
add some consts.
2008-05-06 12:49:37 +00:00
ehouse
5c8756856d
fix crash: check that tile exists before removing
2008-03-12 12:21:23 +00:00
ehouse
0b1f4b8f0a
merge with drag_n_drop branch: apply patch generated with this command on that branch: svn diff -r 2080:2087
2008-03-08 23:16:21 +00:00
ehouse
7c8b7294cd
add const to a bunch of char* decls in APIs and variables; no code change
2007-02-03 17:54:20 +00:00
ehouse
06e6d4a903
Post-Slovak change, 7 bits required to save face and blank bit. Use 7, but expect the old 6 for previous version streams.
2006-11-19 06:40:56 +00:00
ehouse
94b952fb26
Fix assert: implicit cast to boolean doesn't work when bit being
...
tested is outside the low-order byte.
2006-08-22 04:20:40 +00:00
ehouse
4daabf6fe5
Set -Wunused-parameter for those versions of gcc that support it, and
...
deal with the output by removing params where possible and elsewhere
by adding XP_UNUSED macro wrapping __attribute__((unused)). There
should be NO change in function in spite of the large number of files.
2006-08-16 13:44:44 +00:00
ehouse
0b868f5b53
Base the number of bytes used to store tiles on the number in the
...
current dictionary. This allows us to continue to open games saved
with older code using older dictionaries while still supporting the
new format for up to 64 tiles. Old versions may crash when opening
games created by new versions, but that's probably ok.
2006-08-10 01:21:31 +00:00
ehouse
ef6ebe6bac
Add, and use, stream_putString. Saves 500 bytes on win32.
2006-04-25 13:31:15 +00:00
ehouse
92485783af
update email address in header comments: no code change
2006-01-08 01:25:02 +00:00
ehouse
768cfd597a
fix bug truncating tray display in history by adding size param to
...
formatTray()
2005-10-30 18:35:21 +00:00
ehouse
dc84bd22df
dict_tilesToString sig change
2005-07-08 03:02:31 +00:00
ehouse
4095acc327
casts to stop compiler warnings
2005-05-29 19:29:33 +00:00
ehouse
24690a2a10
too much logging
2005-03-21 05:29:37 +00:00
ehouse
2e0ee693bc
add assert
2005-03-15 15:13:52 +00:00
ehouse
26cd5c2d88
add model_recentPassCountOk
2005-03-15 03:31:52 +00:00
ehouse
5894369301
when undoing for purpose of finding last move and there's no pool,
...
don't attempt to replace tiles.
2005-02-02 02:51:05 +00:00
ehouse
7a84f7f425
add param to model_countAllTrayTiles
2004-11-06 02:50:01 +00:00
ehouse
0f557c3e73
nuke tmpModel earlier
2004-11-05 14:29:17 +00:00
ehouse
3046815907
another move-summary bug
2004-10-31 00:54:21 +00:00
ehouse
03eeac1d30
fix bug with printing last move score. Undo on the tmp model wasn't
...
working and so tiles added later got included.
2004-10-30 18:22:39 +00:00
ehouse
30dd160ecc
fix infinite loop looking for last not-undone move to highlight.
2004-05-15 16:06:35 +00:00
ehouse
bc00a04873
fix infinite loop when attempting to undo tile assignment. The ideal
...
fix would allow the undo, but this is much less risky.
2004-05-14 08:55:13 +00:00
ehouse
a4058cf07e
improve what's in scoreboard last-move summary
2004-05-06 04:13:35 +00:00
ehouse
9e8184d444
new functions to figure out score of player's most recent move
2004-04-30 08:29:22 +00:00
ehouse
ae9edbb08d
After an undo, set the prev_move bits on the move now on top of the
...
stack so the tiles will get highlighted.
2004-02-29 06:59:37 +00:00
ehouse
0ac0e9c237
pull tiles from right side of tray first
2003-12-01 14:28:50 +00:00
ehouse
c13e799b11
factor some work of picking tiles/blanks into common code; add option
...
for user to pick tiles from pool.
2003-11-16 17:09:11 +00:00
ehouse
5776da0b93
first checkin
2003-11-01 05:35:29 +00:00