Commit graph

663 commits

Author SHA1 Message Date
Eric House
4ea8569abc honor --min-devs flag 2012-10-27 08:15:07 -07:00
Eric House
b097e0825e fix linux crash do to casting problem 2012-10-26 06:49:15 -07:00
Eric House
aec03fc572 When a game's consumated and guest discovers it isn't using the same
dict, give chance to switch, and to download if required.  Because of
the way the JNI thread works, and JNI's requirement in general that
env instances match up (e.g. dicts must be destroyed in the same
thread that creates them), substituting into a live game is too hard.
So the game's saved with its new dict and then reloaded.
2012-10-24 07:17:21 -07:00
Eric House
13c74cfbd5 protect changeDict feature with compile-time flags (since it can't be
used on Android)
2012-10-24 06:46:54 -07:00
Eric House
c69dbda36f add new game_changeDict() and enough gtk code to test it. 2012-10-23 19:06:00 -07:00
Eric House
4cf595e939 on commandline, only allow assignment of per-player dicts to local
players.  I don't know what happens when a player's position is
changed when its game is a guest and the hosts rearranges players.
Which is why on Android I'm moving to allowing per-player dicts only
on local-only games.
2012-10-14 19:10:42 -07:00
Eric House
25a1ee451b resolve links if required to get the actual name of the dict 2012-10-12 20:50:34 -07:00
Eric House
e90c5ee94f pass index of resigning player into util_notifyGameOver. Not yet
passed into java.
2012-10-09 05:31:12 -07:00
Eric House
e64ecfb78d implement resign on top of existing endGame logic, adding "quitter" as
new param passed to remote and changing final score formatting and
menu items to match.  Still need to show old menu on android in case
where game has already ended.
2012-10-07 12:47:06 -07:00
Eric House
4e0c7923d9 fix bug with clean target introduced when BUILD_DIR was introduced 2012-10-07 12:14:47 -07:00
Eric House
968340f665 Fix release-build warnings that new compiler flags. 2012-10-07 11:43:50 -07:00
Eric House
fd9b9f85e2 make util_hiliteCell conditional, and remove from android where it
wasn't used anyway.
2012-10-05 18:51:32 -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
53774eb807 Merge remote-tracking branch 'origin/android_branch' into android_branch 2012-09-24 20:08:14 -07:00
Eric House
140c982d41 merge from android_branch 2012-09-24 07:39:44 -07:00
Eric House
bdc114dc46 add phony targets to check, on debian-based systems, whether required
packages are installed and to install them.
2012-09-24 07:26:37 -07:00
Eric House
4fa5c61e14 add option to build in a separate directory, for e.g. case where source files
are on ro filesystem.
2012-09-17 06:48:53 -07:00
Eric House
a6bed2706d include, commented out, the parameter that makes things fall apart. I
think the protocol needs work to survive devices failing to save
state.  Better to work on making sure they always save.
2012-09-11 20:45:03 -07:00
Eric House
761f93dd7e use new mem_stream_make_sized 2012-09-11 19:07:00 -07:00
Eric House
75474e1891 Add option to pretend save failed a random pct of time. Point it to
test fix for problem on Android, but right now turning this on breaks
networking.
2012-09-11 07:26:17 -07:00
Eric House
ad4231289f fix --max-devs and resigns begin allowed when only one game 2012-09-11 07:24:51 -07:00
Eric House
0ccc2331b5 address bug where message was getting ACK'd by a device that failed to
save what it had ACK'd leaving the game permanently broken.  Do that
by adding a new method game_saveSucceeded() called after the client
claims to have committed bytes returned by game_writeToStream() to
disk.  In that method comms updates the value it'll use in subseqent
ACKs.
2012-09-10 07:31:45 -07:00
Eric House
1608f0a8f9 handle missing error messages 2012-09-09 15:49:17 -07:00
Eric House
9340db36c1 disallow opening android DBs when not configured correctly. 2012-09-09 15:48:57 -07:00
Eric House
8fbc9ca343 fix to compile in release mode 2012-09-09 09:22:00 -07:00
Eric House
95a7b14a3a transmit dict's md5sum along with name in initial message from host to
guest.  On guest, pass that sum into client code along with names so
the appropriate tests can be done and corrections taken.
2012-09-08 20:23:48 -07:00
Eric House
9a72f252ed Merge branch 'android_branch' into android_dictname 2012-09-08 13:20:59 -07:00
Eric House
14a77ff7f1 factor out common code 2012-09-08 07:45:18 -07:00
Eric House
5fa9b60846 add md5Sum field to dict struct, and on linux load it if present,
otherwise calculate it.  In DEBUG builds always calculate and assert
they match.
2012-09-07 20:34:06 -07:00
Eric House
270a19f3aa Revert "first of a set of changes to communicate to clients dictionary being"
This reverts commit b7a0f1489b, which I didn't mean to check in on this branch.
2012-09-03 21:34:51 -07:00
Eric House
ea4d805d5f first of a set of changes to communicate to clients dictionary being
used by server.  Clients need to care if e.g. the server's disallowing
phonies based on its dict.  Can only be sent if client is of latest
version.  In that case, common code calls into new util function.  In
future changes, BoardActivity's implemention of the callback will need
to check if the server's choice of dict is available, and if not offer
to download it.  Once it's available, will want to install it.
2012-09-03 21:33:46 -07:00
Eric House
b7a0f1489b first of a set of changes to communicate to clients dictionary being
used by server.  Clients need to care if e.g. the server's disallowing
phonies based on its dict.  Can only be sent if client is of latest
version.  In that case, common code calls into new util function.  In
future changes, BoardActivity's implemention of the callback will need
to check if the server's choice of dict is available, and if not offer
to download it.  Once it's available, will want to install it.
2012-09-03 21:29:21 -07:00
Eric House
4cb848582e fix edge cases in prefix matching 2012-08-28 07:35:11 -07:00
Eric House
145317426d Fix prefix matching to accept letters constituting the first part of a
digraph tile when at the end of a prefix so that e.g. GORIL in Catalan
will list GORIL·LA (rather than nothing since GORIL, ending with the L
tile, is not a prefix.)
2012-08-27 21:50:09 -07:00
Eric House
79be03ac66 splite lines to get under 80 columns; no code change 2012-08-27 07:06:40 -07:00
Eric House
9d174601b9 add field, and getter, for new dict header description string, and
load it in linux client.
2012-08-26 20:58:28 -07:00
Eric House
b29df8512a add null-terminated note to dawg header and modify linux client to
accept it if present.  Android client will successfully ignore it and
will need to be modified to capture and display it if present.  Idea's
to display information about copyright, source, etc. of wordlists.
2012-08-25 10:20:52 -07:00
Eric House
a86ab69aec don't store argv element in game data structure where it gets freed. 2012-08-22 07:35:18 -07:00
Eric House
13d359cb39 turn on endgame BONUSALL feature for linux client too 2012-08-13 06:44:46 -07:00
Eric House
c98bbe2b9a use setsockopt to limit read() block time and so to prevent linux
version from being unkillable when relay crashes at the wrong time.
2012-08-13 06:44:16 -07:00
Eric House
c49408d7e9 fix warnings compiling in release mode 2012-08-12 19:37:47 -07:00
Eric House
ec0702d584 initialize buffer that common code will pass to strcat. 2012-08-10 21:31:01 -07:00
Eric House
464696566d get rid of NODE_CAN_4. Not change to post-compiled code 2012-08-01 20:29:15 -07:00
Eric House
d25916ae5f protect sqlite code with compile-time flag so easier to disable. 2012-07-29 08:37:08 -07:00
Eric House
08e5fbdcc2 add ability to open game in sqlite3 DB from an Android phone. It's
read-only now: changes are not saved.  But it works!
2012-07-26 20:44:33 -07:00
Eric House
0c030360bf fix compile warning 2012-07-26 20:42:25 -07:00
Eric House
9b0436d1ee Make rem string measure function return boolean to indicate rect will
be invisible rather than setting width and height to 0.  No real
change beyond simplifying/speeding platform code.
2012-07-15 09:30:27 -07:00
Eric House
bd70a1dd7d improve text in remaining tiles dialog, and always show the tiles for
all trays rather than excluding those in current player's tray.
2012-07-09 21:44:29 -07:00
Eric House
f1c5ebeb31 don't hide REM tiles square when drops to 0 2012-07-09 21:43:35 -07:00
Eric House
d234646fb2 fix broken compile 2012-07-09 21:17:01 -07:00