Eric House
c73eec567b
fix some const confusion the stricter android gcc found
2014-10-14 06:24:41 -07:00
Eric House
4eb836ab2b
fix to compile -- graft missed a constant defined earlier
2014-10-09 21:21:27 -07:00
Eric House
badc40f90b
move dividerLoc into model and use to limit sorting to tiles to its
...
right
2014-10-09 20:09:24 -07:00
Eric House
195371ea2e
as proof of concept, skip the first 3 tiles when sorting newly
...
assigned. Later '3' will be replaced by the location of the tray
divider, but that has to be moved from board to model first.
2014-10-09 20:08:41 -07:00
Eric House
9e86874e77
catch bt version up
2014-08-27 20:23:57 -07:00
Eric House
8407d3b300
cleanup and list changes
2014-08-26 22:17:34 -07:00
Eric House
d8266f6a2c
tweak title and body of notification
2014-08-26 21:53:28 -07:00
Eric House
88248131da
show new client-formatted turn summary in notification; remove old
...
common-formatting code.
2014-08-26 21:37:33 -07:00
Eric House
2d08848715
snapshot: toward having a better description of the last move in
...
notifications.
2014-08-26 06:55:26 -07:00
Eric House
c2c81dbbf1
use tmp model to find words crossing a point to avoid undoing pending turns
2014-03-20 18:52:57 -07:00
Eric House
a7c114e3f9
refcount dicts. Model "owns" its copy and so increments the refcount when gaining one and decrements the count on any being replaced (and on all on exit). This is setting up the real change, which is to let the java world wrap dicts in objects that hang onto them until they're destroyed, which should fix problems where dicts are referenced after they've been destroyed.
2014-03-08 20:57:27 -08:00
Eric House
39983f65b6
remove logging
2014-02-27 21:44:25 -08:00
Eric House
b5d6c513a6
add canUndo to GameStateInfo and use to hide the undo menu
2013-12-03 07:06:48 -08:00
Eric House
53e6db5683
remove return from middle of function
2013-10-27 21:47:49 -07:00
Eric House
bd1a909321
assert, in debug-only code, that saved moves alternate between players
...
and are ordered. I've seen games in the wild with three moves in a
row by the same player and want to catch this in testing.
2013-03-01 07:49:26 -08:00
Eric House
968340f665
Fix release-build warnings that new compiler flags.
2012-10-07 11:43:50 -07:00
Eric House
6ddd4a61c1
fix compile errors (mostly unused variables) found by gcc on latest
...
Ubuntu (12.04).
2012-09-25 07:28:02 -07:00
Eric House
2f8b6cceb5
pass additional param into callback -- unused so far.
2012-09-06 07:19:12 -07:00
Eric House
c13971e3d8
convert a few more variable names from single- to double-letter
2012-08-23 06:38:29 -07:00
Eric House
32e1530d3f
i => ii; no other change
2012-08-22 07:44:21 -07:00
Eric House
de87b32bb8
fix bug the right way this time: it's ok for a word not to be in the
...
current player's wordlist when the most recent move's being reported,
but not to ignore word legality altogether.
2012-08-15 18:11:16 -07:00
Eric House
de9a408b15
Revert "Fix bug where if word being scored for long-touch-on-scoreboard wasn't"
...
This reverts commit 07912bdcdb
.
Problem is it breaks WARN-PHONIES
2012-08-15 18:01:36 -07:00
Eric House
07912bdcdb
Fix bug where if word being scored for long-touch-on-scoreboard wasn't
...
in current player's dictionary it'd show up empty: word, once played,
needn't be legal to be displayed.
2012-08-12 19:25:16 -07:00
Eric House
bfc68656cb
move arrow to where removed tile was, and set its direction based on
...
whether removed tile and the next tile are in the same column or row.
2012-07-10 18:00:23 -07:00
Eric House
821add6df5
fix to compile when HASH_STREAM not defined
2012-05-29 07:19:19 -07:00
Eric House
adadc9c90c
use new hash algorithm for new stream version, old for previous
...
versions. Tested upgrade scenario from b44: works.
2012-05-28 11:07:59 -07:00
Eric House
5104ca6bc5
always sort tiles prior to including in hash -- as a fix for the case
...
where a game is opened that was created by an earlier version that
didn't save assigned tiles in sorted order.
2012-05-05 17:33:07 -07:00
Eric House
eb2f5ff6eb
sort assigned tiles before putting them in the move stack. Fixes hash
...
comparison failure when devices are using sort-tiles option.
2012-05-05 09:47:57 -07:00
Eric House
de3107271d
changes to make hashing work -- make sure unused space in structs is 0
...
-- and to detect when an incoming move doesn't make sense. These
latter changes may not be necessary now that hash code is checked
first thing, but can't hurt, and there will be devices without hash
codes for a while.
2012-05-03 19:02:42 -07:00
Eric House
c52db8a8f0
toward better recovery from out-of-sync move and undo: include a hash
...
of the move stack with every turn (version permitting), and drop
incoming moves created against a move stack different from ours.
2012-05-01 07:58:11 -07:00
Eric House
f51c0b39e6
use const where possible for game_writeToStream and others it calls.
...
No other code changes.
2012-03-11 18:28:14 -07:00
Eric House
1e48a8d615
Merge remote branch 'origin/android_branch' into android_branch
...
Conflicts:
xwords4/common/model.c
2011-12-01 20:12:27 -08:00
Eric House
adb9b3853d
fix bugs around new variable-length tiles array changes, and otherwise
...
improve storage of col/row data so that test runs succeed with
MAX_COLS of 16 or 32. Still to do: test mid-game upgrade.
2011-11-28 18:46:08 -08:00
Eric House
2bfe120014
do away with need to accept out-of-bounds values in getTileRaw().
2011-11-23 18:25:12 -08:00
Andy2
21330af568
make tiles array variable sizes. 32*32*2 is too many bytes to use
...
when the typical board at 15*15 requires less than 1/4 of that.
2011-11-18 18:59:59 -08:00
Andy2
210c59ef9b
move bonus square values into model: add API to set an array, and API
...
to query model for values. Now everybody else queries new model API
rather than client via util_getSquareBonus(), model uses its internal
values if present otherwise falls back to util_getSquareBonus(), and
internalizes the array as part of the game. Now it should be easier
to have different bonus patterns and to have them exchanged as part of
network game init.
2011-11-16 19:01:11 -08:00
Andy2
fab39a5f87
Trying to deal with old- and new-proto devices interacting. Fix
...
clients to append their stream version to their inital connect
message. (The format can't change, so detecting additional length was
the only option. comm.c on existing clients won't allow more than one
connect message per channel, so adding a new to be used in addition
didn't work.) New servers detect this; old will ignore. Track the
version (implicit or not) of all clients, and use the lowest any
supports, so that new server and all new clients will use newer proto.
2011-11-16 06:47:55 -08:00
Andy2
bdb8e6f03c
fix several crashers that prevented network games from working when
...
MAX_COLS was larger than 16. In order that old-style messages on
relay be readable by new-style code on device, modified server.c's
protocol to include stream version. But: unless I come up with a
better way of doing this all devices will have to be upgraded at the
same time: old won't be able to read the new format as it's done here.
2011-11-15 06:13:25 -08:00
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