Eric House
814e4dd088
cut some logging
2012-01-03 18:53:58 -08:00
Andy2
2a34cd1e05
remove second param from server_do() -- it doesn't work anyway.
2011-12-21 18:45:05 -08:00
Eric House
b04604595f
change assertion to log -- fails very infrequently which is probably to be expected.
2011-12-15 18:37:20 -08:00
Andy2
17edc79aaf
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java
2011-12-06 19:56:10 -08:00
Andy2
b0470d5276
add new preference that when set prevents calculation and drawing of
...
crosshairs.
2011-12-06 18:17:55 -08:00
eehouse@eehouse.org
e1e8516e1b
Merge branch 'android_branch' into send_in_background
2011-12-02 19:04:12 -08:00
Andy2
52d02f04dd
pass tile value into drawCell(). Java code doesn't use it yet, but I
...
want to play with drawing cells tray-tile-style when they're big
enough.
2011-12-02 18:58:52 -08:00
Andy2
08063d9444
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/android/XWords4/src/org/eehouse/android/xw4/NetUtils.java
xwords4/android/XWords4/src/org/eehouse/android/xw4/XWApp.java
2011-12-01 21:18:37 -08:00
Andy2
3e21b7845a
comment
2011-12-01 21:04:31 -08:00
Eric House
cbd455148d
comment only. I tracked down the most recent network proto change
...
from before which devices probably can't upgrade mid-game once the
MAX_COLS=32 change is enabled and wanted to record it.
2011-12-01 20:23:58 -08:00
Eric House
4a32942e57
two fixes that seem to allow old- and new-proto devices to play games
...
with 15x15 and 17x17 (and presumably larger) with the old games being
upgraded mid-game: when server's new and wants to use a larger board
but not all clients are capable, shrink the board; and, when new
server is opening state saved by pre-upgrade code, assume a non-0
proto version for clients that registered earlier (as old code didn't
save the client's proto version.)
2011-12-01 20:22:16 -08: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
c1e420f726
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/relay/rq.c
2011-11-29 06:45:32 -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
42d1d2f7bd
define variable before it's first used.
2011-11-28 18:21:46 -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
eehouse@eehouse.org
93a7d15a5e
Merge remote branch 'origin/send_in_background' into send_in_background
2011-11-23 17:57:54 -08:00
Andy2
d37424ad7f
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/linux/linuxutl.h
2011-11-21 22:18:52 -08:00
Andy2
d856b9a8ce
Don't behave badly in presence of empty dict: word count should be 0
...
and sanity test should pass.
2011-11-21 18:06:46 -08:00
Eric House
eec83fe5b6
don't fail when RELAY_ALLHERE comes without a connection, as that will
...
happen when messages come in background. I'm not sure what the test
I'm removing was there to catch so need to test thoroughly.
2011-11-21 17:38:50 -08:00
Andy2
872ebe68f4
make array one large to hold word whose len is == max
2011-11-18 21:14:24 -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
cc0105e14c
add param to dict_countWords in which it accumulates counts per word
...
length. Shouldn't hurt speed too much if null passed.
2011-11-18 08:15:21 -08:00
Andy2
598be8b404
MAX_COLS -> MAX_COLS_DICT for dict-related stuff (since dicts are
...
staying with fewer words for now.)
2011-11-18 07:56:02 -08:00
Andy2
2eac8e70e0
adding missing ifdef
2011-11-18 07:43:37 -08:00
Andy2
37e81fd062
use number of bits based on stream version not current build --
...
required in case new code is talking with old in networked game.
2011-11-18 07:43:10 -08:00
Andy2
f9c3a95603
move stream version definitions
2011-11-18 07:41:57 -08:00
Andy2
4760ceda5a
Merge branch 'android_branch' into android_browsedict
...
Conflicts:
xwords4/android/XWords4/jni/anddict.c
2011-11-17 20:55:02 -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
Andy2
2492e7cfc5
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/linux/cursesmain.c
2011-11-13 17:10:46 -08:00
Andy2
dddec50f1d
Merge branch 'android_branch' into android_browsedict
...
Conflicts:
xwords4/android/XWords4/jni/Android.mk
xwords4/linux/Makefile
xwords4/linux/linuxmain.c
2011-11-10 19:22:57 -08:00
Eric House
619c25ee49
add a bit of logging to help deciphering test app problems.
2011-11-10 18:28:11 -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
Eric House
6d98631640
sanity check: make sure tiles are within range.
2011-11-10 18:24:45 -08:00
eehouse@eehouse.org
9f22b11f81
Merge remote branch 'origin/android_branch' into android_branch
2011-11-10 06:54:42 -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
645695e358
improve logging, and fix mistyped variable found by inspection rather
...
because of a problem.
2011-11-10 06:41:07 -08:00
Andy2
b9a7574925
fix emacs header comments; no code change
2011-11-10 06:39:36 -08:00
Andy2
af5c8a096f
don't pass a pointer to a tray inside the model to model code that
...
will modify that tray! Fixes nasty random crash/assertion failure.
2011-11-10 06:35:05 -08:00
Eric House
268f018140
add dict sanity check that will, I hope, catch corrupt dicts.
2011-11-09 06:51:12 -08:00
Andy2
3707e7aaca
tweak to get performance to same level as before length-filtering was
...
added, mostly by using local variables instead of ptr-accessed in
struct and macro magic to support that. Passes every test I can think
of on Linux but fast-scrolling broken on Android.
2011-11-05 06:14:35 -07:00
Andy2
da02e994b7
protext min,max with compile-time flag
2011-11-04 06:16:44 -07:00
Eric House
a2319a8073
experimental additions, mostly compile-time disable-able, so prune
...
dict by wordlen.
2011-11-03 21:25:51 -07:00
Andy2
627410250f
reuse existing code in dict_countWords()
2011-11-03 06:18:53 -07:00
Andy2
5c995af38c
stop changing formats between internal and external structs
...
(iterators); use internal format all the time for speed. Update linux
test code for new API.
2011-11-02 18:32:00 -07:00
Andy2
38867b2875
fix bug in debug free following debug realloc to smaller size
2011-11-02 04:38:39 -07:00
Andy2
eb2b139e48
add some consts and better test for null index data
2011-11-01 18:47:20 -07:00
Andy2
fc4a5c31f4
silence picky compiler
2011-10-31 21:11:52 -07:00
Andy2
0d4404d43b
add dict_getStartsWith(), and code to test it. Lots of cleanup and
...
bugfixing of dictiter code as well.
2011-10-31 21:05:34 -07:00
Andy2
88f556356c
dict_tileForString -> dict_tilesForString
2011-10-31 20:56:48 -07:00
Andy2
69b1b4da27
break dict iteration stuff out into new files. No code change
...
otherwise.
2011-10-31 18:30:55 -07:00
Andy2
1d34c26ebc
remove unneeded parama
2011-10-31 06:37:53 -07:00
Andy2
dc58d123d5
combine params into single struct
2011-10-31 06:34:21 -07: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
Eric House
f6ff3e85c6
Merge remote branch 'origin/android_branch' into android_branch
...
Conflicts:
xwords4/common/dictnry.c
xwords4/common/dictnry.h
xwords4/linux/linuxmain.c
2011-10-28 20:54:55 -07:00
Eric House
71450b02b3
use indexing (and add binary search) to double speed of getNthWord
2011-10-28 20:27:16 -07:00
Eric House
42d1a48a1d
don't include indices for prefixes that don't exist.
2011-10-26 22:25:21 -07:00
Eric House
412a58f6b9
make dict_makeIndex work for depth > 1.
2011-10-26 22:20:21 -07:00
Eric House
f2c4e39cd4
add dict_makeIndex(). Works, but only for depth==1 so far (A, not AA or AAA).
2011-10-26 07:10:50 -07:00
Andy2
fc973079dc
add first cut at dict_getNthWord. Works. Is slow.
2011-10-25 06:48:16 -07:00
Andy2
ac214236c4
add code to walk dict backwards as well, and test code that
...
succesfully walks huge dicts in both directions turning out the same
list of words either way. Still compile-time disabled.
2011-10-24 18:27:16 -07:00
Andy2
7c7cd82e0a
add code to iterate over words in a dict. Works on Linux (iterating
...
forward only) but disabled at compile time. Idea's to have a dict
browser. There was some simple refactoring in common code Android
uses, and that tests fine.
2011-10-21 18:51:33 -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
f41d3c27e6
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/common/server.c
2011-10-19 06:23:16 -07:00
Andy2
c2a7a5c347
fix crash: don't destroy stream if for some reason it's null. Not
...
sure how that happens, but it does.
2011-10-18 21:29:40 -07:00
Andy2
652b7e703a
Remove difference between debug- and non-debug stream format.
2011-10-18 21:27:28 -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
eehouse@eehouse.org
b8adbd94c1
Merge branch 'android_branch' into send_in_background
2011-10-18 06:47:38 -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
8062a027e7
cleanup: NULL's a legal value now.
2011-10-17 06:48:13 -07:00
eehouse@eehouse.org
5afb0ae145
Merge branch 'android_branch' into send_in_background
2011-10-14 22:34:29 -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
Andy2
7449923328
log tiles left in pool -- makes progress of automated/test games
...
easier to follow.
2011-10-13 19:10:13 -07:00
Eric House
861a24dfeb
Merge branch 'android_branch' into send_in_background
2011-10-10 22:42:28 -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
Eric House
eb60bfade7
fix to compile on x86 (with newer compiler that doesn't like unused variables)
2011-10-10 22:40:05 -07:00
Andy2
4bb61401bd
fix crash: src and dest stream params were reversed.
2011-10-10 22:24:44 -07:00
eehouse@eehouse.org
99707e4029
Merge branch 'android_branch' into send_in_background
2011-10-10 18:31:30 -07:00
Andy2
d5ca5bbd0d
remove misplaced assert: in network games illegal words may well
...
arrive.
2011-10-10 06:48:07 -07:00
eehouse@eehouse.org
471a9d988d
Merge branch 'android_branch' into send_in_background
2011-10-05 07:10:52 -07:00
Andy2
90f11abc37
add to game state passed into java world whether it's the cur selected
...
player's turn, and use that to enable/disable Pass/Turn done button.
2011-10-05 06:36:01 -07:00
Andy2
dc20b04a4c
remove unused param (on the C/jni side)
2011-10-04 18:54:53 -07:00
Andy2
3ec97d5c07
Turn "Turn done" into "Pass" when the pending score is 0. To do that
...
I had to pass the score into draw_trayBegin since
draw_drawPendingScore() isn't called until the first tile's placed.
Note: as long as I'm messinng with this menuitem it should be disabled
when it's not the player's turn.
2011-10-04 18:48:33 -07:00
eehouse@eehouse.org
82615f409b
Merge branch 'android_branch' into send_in_background
2011-10-04 06:49:19 -07:00
Andy2
c04f981442
fix new word-list reporting to work for networked games too: create
...
and save a second stream parallel to the existing one reporting the
move scoring. Requires bump in stream version.
2011-10-04 06:44:29 -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
8650c997e0
nuke noisy logging -- that stuff works now.
2011-09-30 18:34:31 -07:00
eehouse@eehouse.org
554e497593
Merge branch 'send_in_background' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into send_in_background
2011-09-30 06:39:23 -07:00
Andy2
c952ebd8e6
cleanup
2011-09-30 06:29:14 -07:00
Andy2
8e0e8d911e
fix compile errors
2011-09-26 18:12:16 -07:00
Eric House
26ba812aff
cleanup
2011-09-22 17:31:57 -07:00
Eric House
f0c3e2c5f0
Merge branch 'android_branch' into send_in_background
2011-09-22 17:22:01 -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
d000c430b9
thought there was an internal problem with pool and wrote debug-only
...
code to check. There wasn't, and it's unused, but no point writing it
again.
2011-09-22 06:40:44 -07:00
Andy2
92614370ce
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/common/comms.c
2011-09-20 06:21:54 -07:00
Andy2
43e8bd7879
formatting only
2011-09-18 19:05:29 -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
63893b8a0d
add stream_getPtr() and use to remove a couple of allocs, including
...
one per message sent.
2011-09-18 16:54:36 -07:00
eehouse@eehouse.org
98c2617613
Merge branch 'android_branch' into send_in_background
2011-09-14 06:47:12 -07:00
Andy2
f8f06a7768
raise same error when try to commit exchange out-of-turn is raised for
...
out-of-turn move attempt -- and don't exit exchange mode.
2011-09-12 18:33:33 -07:00
Andy2
e709ea730c
only exit exchange mode if user confirms trade
2011-09-09 21:30:40 -07:00
Andy2
c9c498786e
add to game state whether any tiles selected. Use that to disable
...
'commit exchange' button when there's nothing to commit, and get rid
of error message used when committing nothing since it's now
impossible (on Android).
2011-09-09 19:04:25 -07:00
Andy2
66fb5f87fb
don't exit trade mode if no tiles selected; fix warning string to match.
2011-09-09 18:40:19 -07:00
Andy2
201db9415c
sort tiles after trade too
2011-09-09 18:32:04 -07:00
Eric House
84931f34ff
Merge branch 'android_branch' into send_in_background
2011-09-07 21:44:36 -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
2d2f3e23fd
change signature of util_playerScoreHeld(): pass player num rather
...
than formatted text. Client code can use new
model_getPlayersLastScore() or whatever else it wants to build text to
show the user.
2011-09-02 18:36:03 -07:00
Andy2
b6a4621617
trivial optimization
2011-09-02 18:34:07 -07:00
Andy2
99679357a8
Exit trade mode on "commit" even if no tiles selected (in keeping with
...
error message on Android); don't block trade if pending tiles are on
board; instead undo them. There's redo now so there's no need to
confirm, no data loss.
2011-09-02 06:48:06 -07:00
Andy2
e94524958f
get rid of util_setInTrade(); fix passing of selBits when trading
...
(broken with prev checkin.)
2011-09-01 19:51:26 -07:00
Andy2
8e45dcd720
exit trade mode only in the case where we're asking user to confirm,
...
and do it before server can call callback that changes selPlayer so
it'll actually work.
2011-09-01 18:50:09 -07:00
eehouse@eehouse.org
b6e5327b1a
Merge branch 'android_branch' into send_in_background
2011-08-31 06:46:42 -07:00
Andy2
9c60a5c05b
make sure util_setInTrade() gets called every time internal state
...
changes, including on creation/load from stream.
2011-08-31 06:33:36 -07:00
Eric House
c01981bc8f
Make miniwindow stuff compile-time optional. The goal's to use native
...
features where they look better or are easier to manage, e.g. Toasts
and dialogs on Android.
2011-08-29 20:36:01 -07:00
eehouse@eehouse.org
3cdd4c1c9b
Merge branch 'android_branch' into send_in_background
2011-08-21 15:04:25 -07:00
Andy2
9612b28b1f
use goto to avoid having multiple returns. No behavior change.
2011-08-21 14:20:59 -07:00
Andy2
eb00984563
Merge branch 'android_branch' into send_in_background
...
Conflicts:
xwords4/android/XWords4/src/org/eehouse/android/xw4/GameUtils.java
2011-08-20 12:44:17 -07:00
Andy2
7a1346e530
add assert to catch bad dict earlier
2011-08-18 07:49:40 -07:00
Andy2
b9be2b45f4
sendMsg needs to report success if no-conn send works.
2011-08-17 18:41:45 -07:00
Andy2
7ab8c6eca4
re-factor sending code so essentially same message (without cookieID
...
that implies a connection) is sent and received by no-conn code. Use
flags to determine if comms can support no-conn sending without making
up the message only to have it fail to send.
2011-08-16 19:36:23 -07:00
Andy2
dfab747504
make server_do() take a new param to allow caller to call it until
...
there's nothing more to do (without the assumption it's driven from an
event queue.)
2011-08-16 19:28:59 -07:00
Andy2
e88af19e0a
toward the ability to send replies to messages received in background
...
without user having to open the game, which will e.g. allow a host to
assign tiles, or a robot to move, without the phone's owner noticing
there's a message. This is on a branch because it may never work.
2011-08-10 18:28:34 -07:00
Andy2
35f059e14c
remove logging
2011-08-08 20:21:55 -07:00
Eric House
cbfdf992bd
add compile-time option to allow passing game seed from commandline.
...
This should allow testing relay changes to deal better with duplicate
seeds.
2011-07-31 22:23:46 -07:00
Andy2
de16ee93d7
get rid of some logging
2011-07-20 18:46:55 -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
febb640049
add name of remote player to notification that remote player moved.
...
And remove a few dead strings.
2011-07-15 18:13:55 -07:00
Andy2
f4a11d2be5
ignore commit turn request when player has 0 tiles. This catches,
...
awkwardly, the case in a networked game where a player runs out of
tiles in his turn but the server hasn't responded yet to kill the
game. It remains the player's turn and he can make lots of 0-point
moves while waiting. (Making it the next player's turn would be the
right thing to do if that player were always on a different device.)
2011-07-12 07:13:21 -07:00
Andy2
42e7a113b9
tweak logging
2011-07-12 07:09:40 -07:00
Andy2
f3ab40519d
add new error message to DEBUG-only printing code.
2011-07-06 06:47:56 -07:00
Andy2
4b75174170
save stateAfterShow as part of serialized game state. Fixes problem
...
where games with more than two devices would hang because server.c
code was dropping messages that comms.c code thought were good and so
ACK'd preventing them from being sent again. They were being dropped
because the game was in the wrong state after displaying a move-made
dialog because the state it was to move to after doing that display
had not been saved.
2011-07-04 12:51:00 -07:00
Andy2
0eec455119
change one return type; improve logging
2011-07-04 12:46:48 -07:00
Andy2
8904f37e1a
force XW_STATE to be 1 byte.
2011-07-04 12:45:51 -07:00
Andy2
a96dfb57f6
drop-packet test got an assert because we assumed the effects of a
...
dropped packet. Instead, now treat the connection as broken and
restart.
2011-06-27 18:30:52 -07:00
Andy2
e886a1aefe
lots more changes -- another snapshot, this, rather than stuff
...
carefully polished and reviewed. Shows progress, though, in getting
through tests.
2011-06-23 07:12:50 -07:00
eehouse@eehouse.org
484bb295d0
Merge branch 'android_branch' into android_invite
2011-06-06 22:08:49 -07:00
Andy2
1bc70f2c8f
google reports a crash in warnIllegalWord that only makes sense if I'm
...
passing a 0-length array of bad words. That in turn suggests a
screwup where a move's rejected for some reason other that a word not
being in the dictionary. This is all supposition, and all stuff
that'd be caught by asserts in a debug build, but: when there are no
bad words don't report them -- even if the move's rejected.
2011-06-06 20:33:10 -07:00
Andy2
a29f08616e
what I meant to check in.
2011-05-19 22:53:58 -07:00
Andy2
89911ecaa4
add server_getMissingPlayers to return a bitvector indicating players
...
not yet received on device. Meant to be included in summary. I'm not
happy with how much code it took to figure this. I don't know
server.c all that well any more.
2011-05-19 22:48:21 -07:00
Andy2
4c5c435fb5
add new parameter so client always gets notified on connection
...
including how many players are still missing.
2011-05-19 05:51:00 -07:00
Andy2
3b3a822dcc
a gmae may have several dictionaries in several places, but all should
...
share the same language. So pick one to send to draw_dictChanged
rather than sending all (some of which may be null.)
2011-04-28 18:40:44 -07:00
Andy2
af08b2e5b0
add a couple of asserts
2011-04-25 20:17:54 -07:00
Andy2
4e7570020f
remove mistaken (I think) assert
2011-04-20 22:13:44 -07:00
eehouse@eehouse.org
5a21aea2e5
Merge branch 'android_branch' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into android_branch
2011-04-13 06:58:58 -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
92ac25ed3f
don't require MAX_NUM_PLAYERS==4
2011-04-12 22:17:45 -07:00
Andy2
002bb40a09
report counts/values using language rather than dictionary name. To
...
support that, pass lang name from java into jni.
2011-04-11 18:55:42 -07:00
Andy2
96254ad8b5
when opening saved game, notify draw of per-player dicts as well as of
...
a single game-wide one.
2011-04-11 06:39:31 -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
Eric House
67a3349919
Don't move arrow on pen-up if pen-down was in a different cell.
2011-03-29 18:13:38 -07:00
Eric House
f4ea54c30b
cleanup; no behavior change
2011-03-29 18:12:55 -07:00
Andy2
d9bb5197d4
Add two new menus to be available only when in trade mode. Hide and
...
show them and another group depending on whether trading at the time.
To make that work, replace the individual calls made to dis/enable
toolbar buttons with a single jin call that takes a struct full of
booleans and make that struct available in BoardActivity where menus
are hidden/shown. Remove the individual calls from the jin interface.
2011-03-10 18:13:56 -08:00
Andy2
aa88503cfb
have board_canHint() return false when trade in progress.
2011-03-08 07:40:38 -08:00
Andy2
828bd9aa4c
fire user error rather than committing turn when trade attempted
...
without any tiles selected.
2011-03-07 06:28:43 -08:00
Andy2
d2fda267e5
fix assertion failure that happened when I changed whether remote
...
scores were shown mid-game. If the value's not as expected just don't
show the score.
2011-02-18 17:43:01 -08:00
Eric House
984227955b
make two versions the same since there's been no release since first was added.
2011-02-09 22:17:18 -08:00
Andy2
c56f0b5cea
Save cached prev move explanation as part of stream so can be shown to
...
user when game is opened later. Fixes problem displaying empty
explanation on first open of game that was updated in the background.
2011-02-09 06:30:51 -08:00
Andy2
8a7029435c
fix some comments
2011-02-01 18:55:48 -08:00
Andy2
4b8e462b8b
check for null ptrs to allow creating loading games that won't draw or
...
communicate with users.
2011-01-23 21:45:41 -08:00
Andy2
d98a3fe232
when peeking is disabled (the default on android), don't allow
...
swapping to view of the current player's board if the current player
is remote -- because then won't be able to swap back to own view until
it's your turn. Fixes annoyance in multi-device game on Android.
2011-01-21 21:32:52 -08:00
Andy2
7d6e136ca3
fix comment
2011-01-19 06:21:31 -08:00
Andy2
cd5dedfa67
add compile-time flag to disable selection of tiles in tray (other
...
than as part of an exchange) and to remove feature where tapping empty
cell moves selected tile there. This is to address user confusion on
Android, and I'll ask for testing before putting this in the main
branch. This leaves only place-arrow-then-tap as an alternative to
drag-and-drop, and may annoy people. Worth trying: disable only the
automatic selection of another tile after the selected one is dropped.
2011-01-12 19:00:48 -08:00
Andy2
6ccf0c167c
fix next-hint which I just broke: need to track whether working on
...
behalf of robot after all, though it's not needed in the API, to
distinguish case where moves must be cached (for next-hint feature).
2011-01-11 18:10:48 -08:00
Eric House
2b502a39c6
fix mod-by-zero error when iq == 2
2011-01-10 18:19:10 -08:00
Andy2
efb54c7b05
fix compile errors the stricter android compiler found.
2011-01-10 06:56:11 -08:00
Andy2
f111b78714
switch from tracking robot intelligence as a per-game boolean
...
implemented (when not smart) as trying to match the human's score to a
per-robot value between 1 and 100 that gives the percentage of best
moves to store before picking randomly from among them. So a 1 means
save only the best move and always pick it; 100 means save all the
best moves (how many are saved is compile-time configurable) and pick
one of them. Because it's settable per-robot a smarter robot can be
played against a dumber one (though I may choose not to make it
settable per-robot on shipping versions.)
2011-01-10 06:44:28 -08:00
eehouse@eehouse.org
64bcb8bb2b
Revert "replace call to rand() with android_only function that reads two bytes"
...
This reverts commit 1653b9f6e9
.
2010-12-08 05:38:41 -08:00
Andy2
4a12f7a96f
Revert "in attempt to work around non-random rand() in jni world, call back"
...
This reverts commit 99c92e779d
.
Conflicts:
xwords4/android/XWords4/jni/utilwrapper.c
2010-12-07 18:43:53 -08:00
Andy2
e4999acc98
add dict_getWordCount()
2010-12-06 18:24:31 -08:00
Eric House
c4cdc24b78
initial changes to add a header to xwd format so that stuff like
...
number of words can be included. Changed to build dicts and linux to
open them. Android still needs to learn. Also, some of the tools in
dawg/ need to be fixed to read old-format (pre-utf8) .xwd files.
2010-12-05 19:33:10 -08:00
Andy2
99c92e779d
in attempt to work around non-random rand() in jni world, call back
...
into the java world by making it a util_ctxt function. Do same on
linux to test. We'll see how it is -- and can back this commit out if
there's no improvement.
2010-12-02 19:02:36 -08:00
Andy2
1653b9f6e9
replace call to rand() with android_only function that reads two bytes
...
from /dev/urandom. rand() has been returning pretty crappy numbers
resulting in lots of clustering of tiles in trays. Let's see if this
is any better.
2010-11-29 17:12:12 -08:00
Andy2
3ee3af8881
init crosshairs correctly so 0th column and row aren't drawn short.
2010-11-22 07:04:51 -08:00
Andy2
92940e6638
add model_getNPlayers()
2010-11-19 18:22:39 -08:00
Eric House
7a2d279308
add logging so script can better track what state relay game is in
2010-11-18 22:27:06 -08:00
Andy2
b0a4790ce0
respond to new game-gone message by passing to utils.
2010-11-11 06:41:24 -08:00
eehouse@eehouse.org
048eff92b8
Merge branch 'relay_proxy' of /home/andy2/dev/git/LOCAL_ORIGIN into relay_proxy
2010-11-10 07:17:39 -08:00
Eric House
2a2f4d4395
been a while since cvs...
2010-11-09 05:53:49 -08:00
Andy2
22f7a42c1d
make comms_getChannelSeed non-static so jni can call it
2010-11-08 17:22:38 -08:00
Andy2
cfd4345287
remove too-frequent logging
2010-11-07 13:31:43 -08:00
Andy2
99a557a604
fix blanks-first option to assign one blank per tray rather than all
...
to first. Makes for more realistic test.
2010-11-07 12:20:39 -08:00
Andy2
dd3bd1f661
don't show hint buttons until there are tiles assigned
2010-11-06 21:31:53 -07:00
Andy2
9e05e6c2b3
add lastMsgRcd to status printout
2010-11-03 18:28:54 -07:00
Andy2
3d70da5a8d
cleanup
2010-11-01 06:57:54 -07:00
Andy2
804070efc7
base comms_canChat() on whether connID's been assigned. It's possible
...
to send a message from a client immediately after its initial message
but init-message dupe-detection in comms will drop that because only
one channel-0 message is expected -- the initial connection message.
So don't encourage platform code to enable the feature before common
code can deliver the message.
2010-11-01 06:57:41 -07: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
Andy2
0d7f2c4f23
add devOrder (= hostID) to params passed on connect. Should make for
...
better explanatory message.
2010-10-29 06:31:33 -07:00
Andy2
4cd15a9c6a
Merge branch 'relay_proxy' of ssh://xwords.git.sourceforge.net/gitroot/xwords/xwords into relay_proxy
...
Conflicts:
xwords4/common/comms.c
2010-10-29 05:27:07 -07:00
Andy2
41fc05106b
add room name to callback used when device connects
2010-10-28 18:45:55 -07:00