Eric House
0cb217496e
cleanup
2012-05-24 22:22:00 -07:00
Eric House
9354e0e0cd
fix off-by-one error in stream_copyBits that seems to have been
...
responsible for HASH_STREAM not working.
2012-05-24 22:16:22 -07:00
Eric House
60e1d50f43
add stream_copyBits, and use it to hash the move stack -- commented
...
out via conditional compile as it still doesn't work in all cases.
2012-05-22 19:24:54 -07:00
Eric House
2564a660ad
remove logging
2012-05-18 21:23:12 -07:00
Eric House
3a54aa0ebc
add util_informUndo() that gets called, and puts up a dialog, after
...
remote device has performed an undo on a committed turn.
2012-05-14 07:01:02 -07:00
Eric House
d846f96ec5
post-code-review cleanup: no significant change
2012-05-09 06:51:06 -07:00
Eric House
155df55b5c
break hash finishing stuff out to be called only once
2012-05-07 20:48:00 -07:00
Eric House
08f03af2cc
don't write gameID as 32 bits when it's bound for old-version client,
...
and assert based only on the lower 16 bits in case came from
old-version client. Fixes crashes testing mid-game upgrade from beta
43.
2012-05-07 07:02:43 -07:00
Eric House
3b3439371f
Merge branch 'android_branch' into android_bt
2012-05-05 17:33:21 -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
64199c4e64
Merge branch 'android_branch' into android_bt
2012-05-05 11:08:03 -07:00
Eric House
058cbc4e1b
first attempt, commented out, to hash the stream directly rather than
...
its exploded contents. Does't work once there's been some undo
activity as I don't have a way to get the length of the stack below
the undo/redo line. Looks promising though.
2012-05-05 10:47:28 -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
d59b19514b
Merge branch 'android_branch' into android_bt
2012-05-03 21:44:35 -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
47dde6cf3c
init bitfield to 0 in case I want to hash stream directly
2012-05-03 19:00:43 -07:00
Eric House
652fe6dd64
fix test: unsigned can't drop below 0
2012-05-02 20:42:45 -07:00
Eric House
26913c5a37
get rid of excessive logging
2012-05-02 20:41:46 -07:00
Eric House
09f9038cff
add option to have robot choose to trade tiles a configurable percent
...
of the time. Meant to increase automated test coverage of trades.
2012-05-02 20:14: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
0e07fab731
add stack_getHash() -- returning hash of current move stack (excluding
...
any pending redos)
2012-05-01 07:56:45 -07:00
Eric House
89ca45357a
add pool_containsTiles()
2012-05-01 07:49:41 -07:00
Eric House
c15b56199c
use marker enum to test for size. no code change
2012-04-22 17:55:53 -07:00
Eric House
033a69be8d
to make it easier to tell games apart, print the number[s] of the
...
remote device[s] as part of summary view and in game config screen
(read-only). Use same field in summaries table for remote phone
numbers and bt addresses.
2012-04-18 23:23:36 -07:00
Eric House
416a1054a7
Merge branch 'android_ack' into android_bt
...
Conflicts:
xwords4/common/comms.c
xwords4/common/comtypes.h
2012-04-13 20:57:35 -07:00
Eric House
f22d9530b1
track what's been ack'd, and add method to ack what hasn't been.
2012-04-13 20:21:59 -07:00
Eric House
404265565b
tighten definition of connected BT or SMS game
2012-04-12 22:14:13 -07:00
Eric House
ac06d730f8
fix so chat works on SMS (and BT, though untested)
2012-03-24 12:04:07 -07:00
Eric House
fe614e9efc
delegate phone number comparison to platform code which in Android
...
case has a method for it. strcmp is not enough.
2012-03-19 07:36:18 -07:00
Eric House
9caeff4a5e
recover a bit better from messages not meant for me, as is happening
...
when a devices sends to self via SMS and client winds up getting a
registration message it just sent. Not perfect yet (and may require a
change in the comms protocol -- that's not versioned :-(.
2012-03-19 07:35:20 -07:00
Eric House
cd8889f90e
Merge branch 'android_branch' into android_bt
...
Conflicts:
xwords4/android/XWords4/src/org/eehouse/android/xw4/DlgDelegate.java
xwords4/linux/Makefile
2012-03-12 07:04:06 -07:00
Eric House
3b5dcdc2e0
add const param decls; remove redundant method call
2012-03-12 06:59:08 -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
07fba2c71b
Fix problem with writing server to stream changing its internal state
...
so that snapshotting made score strings disappear. Also rename
stream_copyFromStream to stream_getFromStream to make it clearer that
the src is modified. And swap params in stream_setPos().
2012-03-11 14:57:28 -07:00
Eric House
5c11f1b284
add XP_LOGSTREAM
2012-03-11 14:46:03 -07:00
Eric House
a2493ffa97
Merge branch 'android_branch' into android_bt
2012-03-06 07:47:05 -08:00
Eric House
24ac205917
cleanup -- no behavior change
2012-03-06 06:23:04 -08:00
Eric House
eec1cb00a1
wrap UUID in #ifdef XWFEATURE_BLUETOOTH
2012-02-27 20:30:48 -08:00
Eric House
9a2b488183
Merge branch 'android_branch' into android_bt
2012-02-14 16:56:20 -08:00
Eric House
914fa857be
return COMMS_CONN_NONE as address type of null comms rather than asserting.
2012-02-14 16:54:19 -08:00
Eric House
1ed1bce7d1
call informMissing after loading game -- before that it'll never be 0.
2012-02-12 22:27:58 -08:00
Eric House
0755a9e781
add new util function that gets called when a game is opened to inform
...
it if any players are missing. Idea's to allow for non-relay devices
the invitation opportunity that comes when a game connects to the
relay and learns that no other games have joined its room.
2012-02-09 05:19:03 -08:00
Eric House
7214b7e12a
turn off the palmos-era bt wrapper stuff I was trying to use to know
...
when to reset the stack. It breaks Android when I turn on
XWFEATURE_BLUETOOTH and adds no value I can see.
2012-02-07 17:38:24 -08:00
Eric House
47c3bd3090
track a BT game's set (singleton for two-device game) of remote
...
devices in summary DB so, e.g., we can quickly determine what games
care when a devices becomes available via BT. First use of this is
notifying when a remote game's deleted -- least that's the plan. This
commit just adds to the DB and scans the DB to build a map of
device->gameIDs array.
2012-02-06 19:02:19 -08:00
Eric House
606e733b19
add _ to typedef to reduce number of etags hits on name. No code change.
2012-02-06 06:27:53 -08:00
Eric House
6326e45892
make btAddr a string rather than array of bytes.
2012-01-31 18:43:26 -08:00
Eric House
6bfd6e74e6
Merge branch 'android_branch' into android_bt
2012-01-26 06:24:18 -08:00
Eric House
866aeb2387
change relay connect message format to include client version (meaning
...
of which is TBD). When a new-version client connects, store the value
it's passed. At first this will let me track how quickly people
upgrade. Later I can use it to let different clients have different
formats to their messages e.g. to proxy.
2012-01-26 05:43:54 -08:00
Eric House
0934f83106
add gameID to params passed to comms' sendproc, including passing
...
through to java layer.
2012-01-25 18:27:37 -08:00
Eric House
a34921155f
make gameID consistently 32 bits in C code. It's been stored as 16,
...
so stream version must change. Plan's to use it to address incoming
BT packets so a game needn't be open to receive.
2012-01-19 18:47:53 -08:00