Commit graph

1453 commits

Author SHA1 Message Date
Eric House
8511c633ee Merge android_translate branch 2020-08-12 16:50:34 -07:00
Eric House
7a43e95aa8 fix crashes when filter strings are too long 2020-08-11 14:13:11 -07:00
Eric House
0f9bcd9898 let user choose between tile-spellings 2020-08-06 11:37:05 -07:00
Eric House
b8f359c3e5 add filtering to wordlist browser
Add a basic regular expression engine to the dictiter, and to the UI add
the ability to filter for "starts with", "contains" and "ends with",
which translate into ANDed RE_*, _*RE_* and _*RE, respectively (with
_ standing for blank/wildcard). The engine's tightly integrated with the
next/prevWord() functions for greatest possible speed, but unless
there's no pattern does slow things down a bit (especially when "ENDS
WITH" is used.) The full engine is not exposed (users can't provide raw
REs), and while the parser will accept nesting (e.g. ([AB]_*[CD]){2,5}
to mean words from 2-5 tiles long starting with A or B and ending with C
or D) the engine can't handle it. Which is why filtering for word length
is handled separately from REs (but also tightly integrated.)

Users can enter strings that don't map to tiles. They now get an
error. It made sense for the error alert to have a "Show tiles"
button, so there's now a dialog listing all the tiles in a wordlist,
something the browser has needed all along.
2020-08-05 09:47:44 -07:00
Eric House
a75264c8eb tweaks for byod 2020-07-25 13:58:29 -07:00
Eric House
fe7e85c93d fix to store mqtt id using properly-named key
And throw in temporary code so those of us testing the stuff don't have
all our existing games stop working.
2020-07-25 13:58:29 -07:00
Eric House
e4f213470c add a basic password for mqtt 2020-06-11 13:11:56 -07:00
Eric House
436d3c2ad0 fix crashes rematching from linux a games started on android
Didn't handle the case where a game included NFC or BT. I should
probably be stripping those on receipt as I think the android side does
when the devices doesn't support 'em. And that in turn should be common/
code. So just fix it for now so testing can continue.
2020-06-04 11:37:07 -07:00
Eric House
43ce9f390a force 16-letter devids 2020-05-31 23:42:44 -07:00
Eric House
27e784e784 change mqtt proto
Making return address part of a header of all messages so server-side
listener can snoop.
2020-05-31 13:13:31 -07:00
Eric House
f6d7eed84d add mqtt as a new transport
This is meant to replace the relay eventually, but for now it's a new
option, like BT or SMS, to be chosen. Protocol is handled in common/
code for the first time, meaning that linux and android interact without
the need to keep two platforms in sync. Linux uses lib-mosquitto, and
Android uses eclipse's Paho client (the generic java version, not the
one that uses four-year-old Service patterns and so crashes for SDK >=
26.)
2020-05-20 13:58:53 -07:00
Eric House
0e9661aa19 fix search of wordlists containing duplicates
Hungarian is unique (so far) in having two-letter tiles that can be
spelled with one-letter tiles AND in allowing words to be spelled both
ways. This crashed search based on strings because there were
duplicates. So now search is done by tile arrays. Strings are first
converted, and then IFF there is more than one tile array result AND the
wordlist has the new flag indicating that duplicates are possible, THEN
the user is asked to choose among the possible tile spellings of the
search string.
2020-05-04 08:33:15 -07:00
Eric House
98ce0e416f api cleanup: dict_iter -> di
(JNI changed too, so it's not just compiler-checked, but tests ok)
2020-05-03 21:45:08 -07:00
Eric House
353e9cf795 remove assertions from dictiter code on Android
Makes wordlist scrolling really slow, and since it's common code keeping
the assertions in Linux is probably good enough.
2020-05-03 10:18:37 -07:00
Eric House
07f4774a7c refactor so common dictnry does more work
Linux and Android duplicated all the code to parse a wordlist file --
and shared a bug that needed fixing. So now most of that is in a common/
function both call, and the bug -- failing to mask out flag bits I don't
care about -- is fixed.
2020-05-01 09:18:27 -07:00
Eric House
e34da24393 revert wordlist changes
There are bugs there still to resolve and I need to ship. Will return
once they're fixed.
2020-04-29 10:15:58 -07:00
Eric House
e7c96290ea name change only
It was confusing using dict_ as the prefix for two "classes"
2020-04-28 15:24:22 -07:00
Eric House
b2bc4e34cf do wordlist lookups using tiles not chars
Fixing a problem with languages (like Hungarian) where it's legal to use
a two-letter tile or two single-letter tiles to play the same word. When
words are seen, or searched for, as char-arrays, there are
duplicates. Current code crashes, but there's also risk the user gets
unexpected behavior. Crash is fixed, and foundation laid for better UX,
by doing all searches for tile arrays. If a search string translates to
more than one tile array the user must choose. For that choice to make
sense it's now possible to translate tile[] to char[] with a delimiter
between the tile strings.
2020-04-28 13:29:12 -07:00
Eric House
88335d38f2 stop using thread->env mapping for util callbacks 2020-04-26 13:39:21 -07:00
Eric House
eb9ef738e4 remove comms/transport from using thread->env map 2020-04-26 13:39:21 -07:00
Eric House
b7b7da795a remove use of thread->env mapper for drawing 2020-04-26 13:39:21 -07:00
Eric House
cfaa6849b2 pass env into dict-related methods
I was getting an occasional crash using a stale env to delete a dict's
resources because the dict was cacheing the env that created it. Dumb!
Using the thread->env mapping stuff worked, but that felt risky and so I
tried just passing it in. It's safe, and involves an amount of change I
can tolerate. So likely going that way.
2020-04-26 13:39:16 -07:00
Eric House
b618c99fa8 just print the upper-case versions of tile faces 2020-04-24 22:21:02 -07:00
Eric House
267a24619a don't require .xwd's extension to be omitted for file to be found! 2020-04-24 21:36:16 -07:00
Eric House
cbf81c64bd track and pass all words when phonies==BLOCKED 2020-04-24 14:58:17 -07:00
Eric House
99df8806c3 wrap test-only feature in new compile-time flag 2020-04-24 13:33:40 -07:00
Eric House
f51030186f fix non-debug build warnings 2020-04-24 08:54:57 -07:00
Eric House
e8a4c6e39a don't run duplicate games by default
Duplicate games get lots of crashes when mixed with phonies code. Will
need to fix that before enabling duplicate mode. In general there are
lots of assertion failures mixing trades and undos and phonies and
running dozens of games at once. I don't think that's new so will ship
now and fix later.
2020-04-24 08:38:31 -07:00
Eric House
f35136099d don't crash when wordlist provides no bitmap 2020-04-23 22:01:07 -07:00
Eric House
e8c48e792a fix tile picker dialog
I wasn't exiting dialogs correctly. Probably broken since the switch to gtk3.
2020-04-22 21:28:27 -07:00
Eric House
4720ede1d7 fix so curses app can invite two players on one device
Turns out the host, when inviting a remote device, needs to know how
many players are on it (since more than one is supported and the script
currently generates that case.) So pass to --server devices an array,
one per remote -- but don't bother when all entries are "1";
2020-04-22 21:28:27 -07:00
Eric House
e68e972396 send NLI in stream format, not as raw bytes
Bad programmer. And because the raw bytes form was so large it always
caused the fake sms stuff to send immediately rather than waiting for a
timer to expire -- which never happened when run by the test script. So
I'm not allowing any timer for invitation-sends only.

(Another problem is that there's no mechanism in the xplat code to retry
invitation sends. That needs fixing.)
2020-04-22 21:28:27 -07:00
Eric House
29dbeebc94 fix assert with reporting no bad words
Several changes toward not allowing bad things to happen
while waiting for a confirmation from the host
2020-04-22 21:28:27 -07:00
Eric House
9d04b97ec8 add option to have robot words reversed
With reject-phonies set this will trigger the reject path.
Also init CommonPrefs in jni land since its makePhonyPct, left unitialized,
causes the robot to deliberately reverse every turn, firing an assertion that the
robot's moves are legal.
2020-04-22 21:26:55 -07:00
Eric House
410bc00d2e add test for being in background 2020-04-22 11:44:46 -07:00
Eric House
5a28a7fc27 fix gtk games connecting to relay/each other
I broke gtk back in February making curses changes
2020-04-22 11:38:48 -07:00
Eric House
54efffa635 pass the wordlist name too 2020-04-20 09:34:14 -07:00
Eric House
10f509ea1f pass and display the blocked word 2020-04-19 22:27:14 -07:00
Eric House
c0f074c1bf support new phony to block words not in dict
Currently detects the same as tiles not in a line and calls out to a new
util method that's currently parameter-less. On Android the option only
appears in d variants.
2020-04-19 17:31:31 -07:00
Eric House
988facccd1 refactor: make vtable population test xplatform 2020-04-19 12:56:11 -07:00
Eric House
2efc82f4e0 add --phonies arg so this doesn't happen again 2020-04-18 06:41:21 -07:00
Eric House
ab07c1c466 show bonus-square-held
Again, so I can see what's going on. Use timeout so doesn't force
lifting the mouse, closer to what happens on Android with Toasts.
2020-04-17 07:06:31 -07:00
Eric House
18711c1dd3 show gtk dialog with lookup-words
That way I can at least see it's working.
2020-04-16 22:54:05 -07:00
Eric House
91e6e50480 stop broken upgrade early-launch case
Wasn't checking for existance of script and so got and exception
deleting what didn't exist. Instead I define nonexistance as being too
early.
2020-04-16 22:18:17 -07:00
Eric House
22f62d53e0 add DB versioning for linux 2020-04-16 22:18:13 -07:00
Eric House
b81bd46645 remove assertion when message mis-delivered
I don't know why, but in my tests the relay seems to be delivering
messages to the wrong device. The linux device detects this. It used to
assert, but now just drops the message. If this is happening on Android
it might be why I'm seeing crashes...
2020-04-11 11:44:09 -07:00
Eric House
87802150d5 fix logging macro to allow a single argument 2020-04-10 07:12:56 -07:00
Eric House
497007a84f show pending name in scoreboard
when remote hasn't arrived, show same string in scoreboard as in games
list rather than the local player's default name -- duh.
2020-04-10 07:12:56 -07:00
Eric House
858d4bd6b7 fix linux build 2020-04-10 07:12:56 -07:00
Eric House
0a696cf203 cleanup 2020-04-10 07:12:56 -07:00
Eric House
387d88bdde fix assertions when duplicateMode on
Hadn't tested in a while and fixing undo problems added some invalid
assumptions.
2020-04-10 07:12:56 -07:00
katianderic
b1f7b13e78 toward fixing stalls when undo used
There are still some stalls turning up when running the test script,
especially with more than two players in a game, but but it'll be
easier to do the final debugging off my pathetic travel-only
chromebook. And things are already much better. :-)
2020-03-14 14:47:26 -07:00
katianderic
781021d6ca trivial changes to aid debugging 2020-03-14 13:44:56 -07:00
katianderic
5d6c2514fd include milliseconds in log timestamps 2020-03-14 13:43:43 -07:00
katianderic
126172220f changes to fix curses app test script
especially on the 'sms' side it was broken. Now Android's broken for sure.
2020-03-14 13:43:43 -07:00
katianderic
0486b956c8 better display of "sms" message passing 2020-03-14 13:43:42 -07:00
Eric House
c54eba2ee5 make core file pattern specifiable 2020-03-14 13:32:47 -07:00
katianderic
96236e8713 fix broken android build
Was missing new logging macro. And remove assert firing when undo
happens in curses app.
2020-02-18 07:57:22 +01:00
katianderic
38a4e494a4 make sms work via invitations too 2020-02-16 22:34:33 -08:00
katianderic
c7c1946793 use deviceID to invite via relay; make 3- and 4-device games work 2020-02-16 19:12:22 -08:00
katianderic
b1bd506e22 harvest relaydevid (for use in invitations later) 2020-02-16 19:12:21 -08:00
katianderic
e5255f59eb add flag without which new game isn't created by default 2020-02-16 19:12:15 -08:00
eehouse111999
35f18955ae improve logging on linux 2020-02-09 21:01:39 -08:00
eehouse111999
845370c9ca cleanup and fix test script stalls
Old code always had client trying to connect. So do that here
too. Seems to fix test script stalling.
2020-02-07 23:11:20 -08:00
eehouse111999
fe48a7c107 tweaks for small screen 2020-02-07 16:34:41 -08:00
eehouse111999
c50e85f34a improve scripts' contribution to setup 2020-02-07 14:37:27 -08:00
Eric House
ac4baff7e7 fix crashes and bugs in linux apps 2020-02-05 22:03:29 -08:00
Eric House
6b41628fbf dup: fix to call informMove(); make strings localizable
Was relying incorrectly on showRobotScores, which is FALSE on linux by default.
2020-02-05 22:03:12 -08:00
Eric House
7076501710 cleanup: unify gtk&curses; make duplicate mode work 2020-02-02 22:10:20 -08:00
Eric House
4c19a00263 cleanup 2020-02-02 19:52:51 -08:00
Eric House
2031dec216 implement drawTimer for curses; allow invite-to-self 2020-02-02 19:12:35 -08:00
Eric House
97c0a58fff make gtk timer stuff work for both
It's glib-based, so why not. And curses implemention didn't work.
2020-02-02 19:03:10 -08:00
Eric House
94137322b7 add missing callbacks (and assert all there) 2020-02-02 17:57:30 -08:00
Eric House
dd0ad8f479 fix linux side to compile without DEBUG on 2020-02-02 15:29:14 -08:00
Eric House
03faeecd0b add new log macro that includes file name and function 2020-02-02 15:29:14 -08:00
Eric House
d36f5e7e49 make same-device invites work on gtk
Added a confirm alert so accidental resends won't create useless games.
2020-02-02 15:29:14 -08:00
Eric House
390753ae3a fix to correctly wrap L·L in 2x2 cell case 2020-01-31 18:57:12 -08:00
Eric House
edec1c01fd curses app tweaks (smaller scoreboard) 2020-01-31 17:55:15 -08:00
Eric House
cdcf63a0bf enable invite by relayID (and rematch from gtk side) 2020-01-31 17:34:41 -08:00
Eric House
d891d59fc9 make query formatting mistakes less likely 2020-01-31 16:54:35 -08:00
Eric House
f706eb0cc7 handle relay-invites received 2020-01-31 13:29:36 -08:00
Eric House
ecacb0587a handle window resize (more-or-less)
My version of curses doesn't seem to have its own SIGWINCH handler that
does the right thing, so use a pipe to let my handler signal to have
work done outside the interrupt context (when window resizing etc. that
might call malloc() isn't safe.)
2020-01-31 12:29:45 -08:00
Eric House
c44268290f only push menu when opening game to display it 2020-01-30 21:32:37 -08:00
Eric House
e9882b45da fix android crash due to bad build.gradle merge
and add pid to curses app display
2020-01-30 21:21:45 -08:00
Eric House
1d35b7e7e0 Squashed commit of the following:
commit 6ed0462040d6fd45bf43c431df5db4702630da4e
Author: Eric House <eehouse@eehouse.org>
Date:   Thu Jan 30 15:55:29 2020 -0800

    script meant to be run in UserLAnd on android

commit 07b603f4abde00f1cb4face7f27d996fed1b0258
Author: Eric House <eehouse@eehouse.org>
Date:   Thu Jan 30 15:01:00 2020 -0800

    fix gtk invite scenario

    required --name param, apparently.

commit 13201c4cedbf6564516ae850956b2f3155def0b1
Merge: a301491fb 752e3ff3e
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jan 30 12:38:09 2020 -0800

    Merge branch 'android_branch' into duplicate_mode

commit a301491fb5d7b2e09f4b932b16c0a82d1429cb64
Merge: 5401a4bbe d6cf1d2f9
Author: Eric House <xwords@eehouse.org>
Date:   Sat Jan 11 20:45:26 2020 -0800

    Merge branch 'android_branch' into duplicate_mode

commit 5401a4bbe54cdad6adbfa8f9ba8a1c0112ff4dbe
Merge: a92275173 9406297c0
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jan 10 09:54:30 2020 -0800

    Merge branch 'android_branch' into duplicate_mode

commit a922751730be87ae1ea7f6b2ee4263e8b14faabf
Author: Eric House <xwords@eehouse.org>
Date:   Sun Dec 29 16:39:51 2019 -0800

    move game list item pending counter below "dup"

commit 53ca75a56ba9ecde917a5c8c91deaf0afdb04ea0
Merge: 658e4ef92 15239d4a6
Author: Eric House <xwords@eehouse.org>
Date:   Sun Dec 29 16:34:07 2019 -0800

    Merge branch 'android_branch' into duplicate_mode

commit 658e4ef92277d0a1b5c7840883edfab55251d99f
Author: Eric House <xwords@eehouse.org>
Date:   Tue Dec 10 20:33:24 2019 -0800

    move BT UUID into build.gradle

    And add a new UUID for the duplicate build so it doesn't try to talk to
    the xw4d variant when both are installed.

commit a3141c86204bcc134a6fea1e8e6d1cedc743ee13
Author: Eric House <xwords@eehouse.org>
Date:   Thu Nov 21 18:52:11 2019 -0800

    modify icon for easier identification

commit db23f45ac075e8bc50c56b7fb9808a7e270f5625
Author: Eric House <xwords@eehouse.org>
Date:   Thu Nov 21 18:38:18 2019 -0800

    change name of key

    I want to force the apps already out there to generate a correct
    key. This has the lowest impact.

commit 91bc3f6ac406b2fda3426bb363c8e59c3973b75f
Author: Eric House <xwords@eehouse.org>
Date:   Thu Nov 21 18:25:08 2019 -0800

    use the right generated file

    Duh. Used the wrong app/project so FCM couldn't work for the new Dup app
    variant. Now it does.

commit d4ef6f12681bae4437e907e47fbdf1b35bf10d98
Author: Eric House <xwords@eehouse.org>
Date:   Mon Nov 18 09:26:46 2019 -0800

    add comms_getPending(), and refactor to implement

commit 60870e43373a8b73f3541529031791e1457aaa15
Author: Eric House <eehouse@eehouse.org>
Date:   Wed Nov 13 12:30:07 2019 -0800

    first cut at python version of dawg2dict

    Perl version doesn't work and I don't remember enough of the language to
    fix it.

commit b9547d1ec49f1d9d95b3b76b2bcc6ef0d088c531
Author: Eric House <eehouse@eehouse.org>
Date:   Wed Nov 13 12:30:57 2019 -0800

    fix comment

commit 442d219aeab0acfd3713e065f3c46cf0b5d40012
Author: Eric House <eehouse@eehouse.org>
Date:   Tue Nov 12 09:08:08 2019 -0800

    check for undefined variable

commit 247415e18d0b764d3cdb52e9eedeac4b183428c5
Merge: 94c2a7e15 bd3b3e75e
Author: Eric House <eehouse@eehouse.org>
Date:   Tue Nov 19 20:12:18 2019 -0800

    Merge branch 'duplicate_mode' of ssh://maidu2/home/eehouse/src/git/repos/xwords into duplicate_mode

commit 94c2a7e151eeb81bb29589db120a08ffdb5e78fb
Merge: 514e33900 a161abc1b
Author: Eric House <eehouse@eehouse.org>
Date:   Tue Nov 5 21:13:23 2019 -0800

    Merge remote-tracking branch 'tmp-eeh/duplicate_mode' into duplicate_mode

commit a161abc1b2c1c0e8ce76ac71e9feed9d567a3a73
Author: Eric House <xwords@eehouse.org>
Date:   Tue Nov 5 15:56:26 2019 -0800

    make a new CrossDup variant

    It's too much trouble having versions of CrossDbg that aren't compatible.

commit 514e33900fad2695dac89371995ea197a3c9fa4b
Merge: 2d5ec2dfc c69ec5250
Author: Eric House <eehouse@eehouse.org>
Date:   Tue Nov 5 08:43:52 2019 -0800

    Merge branch 'android_branch' into duplicate_mode

commit 2d5ec2dfcdf2788baee2fadd69c8cbb7ac3cafd8
Author: Eric House <eehouse@eehouse.org>
Date:   Sun Nov 3 12:34:48 2019 +0000

    log some hashing stuff (to share while debugging)

commit 564165ed2aef2cd2e893a1552dfb94ca61734f0d
Author: Eric House <eehouse@eehouse.org>
Date:   Sun Nov 3 11:23:40 2019 +0000

    remove unnecessary logging

commit 0111db1951e40ff039cd276d1a77dc31d380ce32
Author: Eric House <eehouse@eehouse.org>
Date:   Sun Nov 3 11:22:27 2019 +0000

    fix log_hex format alignment

commit c7e92680c2624c2d45bade42fddb3334348ce8fc
Author: Eric House <eehouse@eehouse.org>
Date:   Sun Nov 3 10:23:17 2019 +0000

    toward making non-dupe stack hashes match

    Changing the format meant that old builds and new couldn't play non-dupe
    games together, which clearly sucks. There's still a problem, but this
    is part of the fix.

commit fb185eca355840423b561e3237a6529ade409850
Merge: a6df962b1 37ac29e65
Author: Eric House <eehouse@eehouse.org>
Date:   Sun Nov 3 09:43:57 2019 +0000

    Merge branch 'android_branch' into duplicate_mode

commit a6df962b1046ff191453a617afbeee272ce3dc66
Author: Eric House <eehouse@eehouse.org>
Date:   Thu Oct 24 21:28:35 2019 +0200

    cleanup (not dup-specific)

commit f8e31d20ae5399db98589540fff432dc053ec633
Author: Eric House <eehouse@eehouse.org>
Date:   Tue Oct 22 13:38:37 2019 +0200

    use https now to fix broken updating

commit 0add4e050235e9aed5e4f841497c02b80113dbdd
Author: Eric House <eehouse@eehouse.org>
Date:   Tue Sep 10 16:39:19 2019 +0300

    let cells be taller than wide too (take 2)

commit 897d4453702a4c820fb99e60ca0be1bca44d0f42
Author: Eric House <eehouse@eehouse.org>
Date:   Tue Sep 10 16:30:14 2019 +0300

    cleanup (not dup-specific)

commit 2973ffb908fc8a966082870dae348cdc74e646c7
Author: Eric House <eehouse@eehouse.org>
Date:   Thu Aug 29 23:08:36 2019 +0300

    assert that valid message is handled

    I suspect that messages are being dropped (in server) after being
    recorded (in comms), causing the game to stall forever. So add an
    assertion that it's not happening. Haven't seen it yet in a few hundred
    games, but it'll be nice to be more confident.

commit ae6aca71245c934ffe1cb8ba4dc12a0bcbfd1dda
Author: Eric House <eehouse@eehouse.org>
Date:   Mon Aug 26 18:35:12 2019 +0300

    remove x86 from release builds

    I either remove it or add the 64-bit abi. Since it's only there to run
    in the emulator let's just leave it in for DEBUG builds. If I need to
    run a release build in the emulator I can add it back.

commit 4d96f05f2ffea6ca3e9b7dd1776c81fbc0a1350b
Author: Eric House <eehouse@eehouse.org>
Date:   Mon Aug 26 18:14:01 2019 +0300

    arm means two ABIs now

commit f00e8c1258ed62fcf74c7f4db856fb8366d3f348
Author: Eric House <eehouse@eehouse.org>
Date:   Mon Aug 26 18:13:40 2019 +0300

    fix release build warnings

commit 86a7de8c493eb57012531e4953bfde8de38bbb97
Author: Eric House <eehouse@eehouse.org>
Date:   Mon Aug 26 08:23:52 2019 +0300

    up API version to 28 (required soon)

commit 3382823b254cd7f2861362a895a7db483e253781
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jul 21 12:08:33 2019 -0700

    wip: add clear 'X' to [un]pause msg editor

commit f0c0663b85bdcb6f36f50464a06ab5fb6041e738
Author: Eric House <xwords@eehouse.org>
Date:   Sat Jul 13 10:11:17 2019 -0700

    wip: stop using IMPORTANCE_HIGH: too obnoxious

commit 280838b680d10f0e5d280257e21c2eab66dbcec9
Author: Eric House <xwords@eehouse.org>
Date:   Sat Jul 13 10:10:53 2019 -0700

    wip: move misplaced assert

commit de004c956f2804264320adf4e197ed7274092f44
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 12 12:06:10 2019 -0700

    wip: store the damned playerNum already

    And remove mistaken minus-sign (typo?)

commit 17434fcb0c35f5e9489a6b01fd40e4908d4547e6
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 12 11:47:27 2019 -0700

    wip: use rowid for notification id where possible

commit 5b20ba2f8c4d17118a709cdec556ea38b3f4199d
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 12 10:53:50 2019 -0700

    wip: be smarter about looking for timer changes

    Add a dutil callback for when timer value changes. In it, pass the new
    value to DupeModeTimer. In that, don't bother servicing until the saved
    value matches the stored/expected value (because there's otherwise yet
    another save coming.)

commit e98d4154224e2013389962d22476bc571d721aa5
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 12 10:48:59 2019 -0700

    wip: add unique notification id generator

    I'm tired of trying to keep rowid-based notifications from trampling
    each other. Now they can be unique per-channel.

commit fd94a0f0d23b4658c93bfb7793e658387bcbbcce
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jul 11 23:55:54 2019 -0700

    wip: auto-pause when nobody moves

    If moves all come in 0 and the timer's running, assume nobody's actually
    playing and pause the game. While at it added [un]pause to game history
    and made history entries include malloc()'d message, requiring a
    free(). Lots of changes, with at least one glitch that games sometimes
    hang after the autopause; and gameslist shows it as nobody's turn though
    when opened the game knows it's a player's turn.

commit dfb6d2c2574fa63d416c7c800e7dbe30b0925143
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jul 8 20:40:11 2019 -0700

    wip: cleanup/refactor

commit d4a37e5a03e874a4d1e43e72183eb73a8c0f70f5
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jul 8 20:23:58 2019 -0700

    wip: run dupemodetimer more than once

    Failure to reset a variable meant I never processed more than one timer
    firing. Oops.

commit a19979ae7f71da4ba8d478c9a5a5ec4bc70b4c96
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 20:03:57 2019 -0700

    wip: zero timer value when move's been made

    Used to actually set the timer value to 0 when move was made, and
    DupeModeTimer expected that. So zero the stored value before returning
    it IFF move's been made already.

commit 7c52ce2a6a08db3b4e2a1bc32f71b073227f23ce
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 19:48:29 2019 -0700

    wip: add pause button to notification

    Make it easier to discover pausibility by adding pause button to
    always-on notification. Implemented by opening the game and then within
    it the Pause confirm alert, which required passing a boolean Extra
    through from the launch intent to the one passed into BoardDelegate.

commit 9f82c2f2a3d710f6ad52b1b4f570625e2c19e277
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 14:31:43 2019 -0700

    wip: fix to redraw timer when only turnDone changes

commit dee10cf35521018805621e3e2b4b58f2c2dee686
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 13:36:06 2019 -0700

    wip: fix compile

commit b1e55307ccd8a849afddc27f9214eea738eb25d7
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 11:43:13 2019 -0700

    wip: show timer when paused, and dim when turn done

commit 289080dcfa19e36ea0aa6bd204b61f81872f2b38
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jul 1 21:01:09 2019 -0700

    wip: save separate excuses for pause and unpause

commit 0d427df8f45cc97e385886058b0b456a4e4ca495
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jul 1 21:00:20 2019 -0700

    wip: invoke pause stuff via tap on timer

commit 6ef72472426c61573249e17a4842247114ecd432
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jun 30 20:39:17 2019 -0700

    wip: pass name with pause info for better notification

commit 429baf6edb41a6821103a499b88406de9eb13673
Author: Eric House <xwords@eehouse.org>
Date:   Sat Jun 29 11:50:40 2019 -0700

    wip: improve pause/unpause confirm dialog

commit 9a302b137d56966513393abb4ca3169274ad72e3
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 21:45:17 2019 -0700

    wip: pass just the message. Let client package it.

commit 6c9025e347a1fb97b90778db6563cd22a5aaa2b8
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 21:41:24 2019 -0700

    wip: trigger notifications etc on pause change

commit dabe79c58c1a6ba1c098688dd2b6b764c543e98b
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 21:18:13 2019 -0700

    wip: missing files

commit 352584858fa106b2094e9a393a9b3959a90511b9
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 21:15:58 2019 -0700

    wip: pass explanatory message with [un]pause

commit a99976713b5f35ee61fc9629fb2df9ac11af9098
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 15:28:55 2019 -0700

    set dbname in build.gradle

commit c0b3be342ad9d89b43ba00d77ae91ad09f8ff211
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 10:00:25 2019 -0700

    fix crash on initial install

    uninitialized variable

commit 3656f1d938c61ebf9ac780905f1a084cb4b024f1
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 27 13:35:30 2019 -0700

    wip: fix too-frequent dupe-game checking

    Do it all on a a background thread, and never process a game that was
    added for processing while being processed. Fixes re-opening because we
    just changed it, but may miss changes that matter.

commit a977b8fa51a8e8f9a469bc6fbf305364a29ef8ac
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 27 11:10:14 2019 -0700

    wip: progress on timers

    Mostly fixing DupeModeTimer to do less on main thread.

commit cb4cdc1c8221dfc94e9c9ef889d5d1b099b44049
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 27 07:14:13 2019 -0700

    use macro for callbacks (as elsewhere)

commit 997de250c8d8e0a2de0b949258b06b8998bc1086
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 22:34:34 2019 -0700

    wip: transmit [un]pause to other devices

commit 970fc8c9dbf3883211c1934f3f999149532609a8
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 17:15:55 2019 -0700

    wip: more timer tweaks

commit b67b836028216345ef8d6d157bdaf9f59f698df4
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 15:01:04 2019 -0700

    wip: fix assignment to wrong variable

commit 48cafcec1471e064413ade48ed79b51f1e7fb922
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 14:41:50 2019 -0700

    wip: wire up [un]pause menus in Android board

commit 0476f1b21f3bd30e3ae970dc85a72a7eac67d5d9
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 11:09:19 2019 -0700

    wip: pause/unpause without communication

commit 71815b2f17f0ca354eb6dd4dd12f65d309723db1
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 10:56:09 2019 -0700

    wip: start adding [un]pause support

commit bc4f04c724f51668ace3db17703aa1446fad7405
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 10:07:24 2019 -0700

    wip: fix to work when timer not set

commit 2b271abbb487aa8c5fa7f792d898c72f5d69e270
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 09:53:29 2019 -0700

    wip: show tiles face-up in history for dup-mode

    No point in hiding them when everybody has the same.

commit 945b8527847af20ca955fb313b7bf49887e4e012
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 09:47:19 2019 -0700

    wip: don't draw paused (0:00) timer in duplicate mode

    Required passing in a new boolean

commit 6229fb88302d6da8d432a743955f3dc54d871bda
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 25 19:16:40 2019 -0700

    wip: adding timers

    interpret the existing timer value as per-move, counting down to 0. When the timer fires, commit and send moves for all local players.
    On Android, show notifications for games where a timer's running and nothing's been committed yet. Very rough, and somehow broke the
    python test script for duplicate games.

commit 7892c42c69d2985b39c9fd50053fad3d5f03ba5a
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 25 16:40:14 2019 -0700

    fix crash closing app when timers enabled

commit 1fbf78931b57ff4d92381a3b7f7e39770cb96ae0
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 24 12:23:33 2019 -0700

    assert thread is same for map and unmap

    It'll be a while before I'm comfortable moving this to main branch

commit 046b2e598ae8368eed6e68b5fbaeba69d0416b96
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 24 12:15:40 2019 -0700

    add refcount on thread->env mapping

    Just as a safeguard to ensure I'm not removing something I'll want
    later. There appears to be no attempt at this point to use a stacked
    protocol -- attempts to add what's already there are just dropped -- so
    actual refcounting isn't working now. But if I double-remove I want to know.

commit 5c44e3cd2df87be904db6a7689c59be4fcf2696b
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 24 09:32:36 2019 -0700

    fix breakage from backport and rebase

commit 4476bf10f222af90547e935d7eabd69fff0be427
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 24 09:13:17 2019 -0700

    add timer to gtk's new-game dialog

commit fb50963e4314f85e8013717e4435671cb66b91df
Author: Eric House <eehouse@eehouse.org>
Date:   Sat Jun 22 20:29:26 2019 -0700

    tweak text

commit 4d7fc28b0e0cc4c0e2c877401eb170a4764059f5
Author: Eric House <eehouse@eehouse.org>
Date:   Sat Jun 22 08:56:27 2019 -0700

    make all config spinners use same styles

    One had a label. How all do, and styles make them the same.

commit 5f064b31be8d8dfff0ada1d34acf2792ac6c721d
Author: Eric House <eehouse@eehouse.org>
Date:   Sat Jun 22 08:23:35 2019 -0700

    make label-plus-timer-setting single-line

commit 38a271578dda87a025acd28c065a9748d88e7246
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 16:32:57 2019 -0700

    wip: specify smaller size to avoid wrap on some phones

    No idea if this will be enough. Or if just saying "one-line" would work
    better.

commit 8e71bfbc011747b7738fd12e437fd73da7a7b01c
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 15:08:51 2019 -0700

    wip: fix false dup-mode tag in games list

    The layouts are reused, so it needs to be hidden for the non-dupe case
    in case it represented a dup-mode game before and the tag was revealed.

commit 2186d72e04df901b53a6d578c24a945b01245f52
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 14:50:15 2019 -0700

    fix listing of Hex language (not dup-specific)

commit a9afebea7493438681e3ebcc366f38542ecf4691
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 11:48:07 2019 -0700

    wip: fix div-by-zero when all games are duplicate

commit 1925ff93cd1019f4daa6c9b86222dbf9f763d876
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 10:30:45 2019 -0700

    wip: store scores in as many bits as largest requires

    breaks storage format!

commit 8fb2678e8e937990ad63569b39c5c12a54a9089b
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 20:26:50 2019 -0700

    wip: reduce scores correctly in dup-mode after undo

commit d1d72ce840eef5a1f9c0e3118660a9498e790848
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 18:26:15 2019 -0700

    wip: fix tiles not being sorted after undo

    I'm doing this in the model where there's no setting to prevent
    sorting. Figure undo's a violent enough change nobody will care.

commit a8a36e8dfa1f61805932cabf607cf6f01b18a2d3
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 17:49:00 2019 -0700

    wip: inval tray when copying from DUP player's

    Fix failure to correctly draw current tray contents after replacement
    based on winning dup. move.

commit 8b2f877f01cf954392841ee3e1eb8b75ce05b646
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 17:13:17 2019 -0700

    wip: mark gameslist items with "dup" if in dup mode

commit 11f680fcce14a0303f50d685dde741b2d57241be
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 10:55:40 2019 -0700

    wip: correct move count display in dup-mode case

commit 84bced651a5765ce5eacef90d653e1807a5e5a1b
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 11 15:29:30 2019 -0700

    wip: fix crashes using word-lookup

    Assertions about dup mode and pending plays being legal words were wrong
    given how commitTurn() was used building a temp model inside
    model_listWordsThrough().

commit 66b39ca29616dd5f7ae948185b6d16f2d207e45b
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jun 9 14:43:28 2019 -0700

    print average scores at end of run

    Should really be done separately by number of players, as non-dup games
    with more players will have lower scores as each has fewer turns.

commit 3f722d974eaa77883f169974bca18e14b89dd829
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jun 9 10:30:26 2019 -0700

    wip: notifiy turn change listeners in DUP case

    Fixes occasional failure to update Exipration display in game list items
    when a move's made.

commit 8fd13b8fc5040db0c5b631e5f97a31db08d7d053
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 22:16:23 2019 -0700

    wip: don't cache variable locally

    For some reason it's not set on K's phone. This is safer: what's always
    worked, and it's late....

commit 6b67c4a59ca42a28d263f22ef334fe0d40fbab80
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 19:07:11 2019 -0700

    wip: move status strings into resources

commit 6779c31f21e26abcbf0364322db1021ad3d82985
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 18:43:56 2019 -0700

    wip: add status alerts for dup state transitions

    So users know what's up, add not-again alerts when server gets moves but
    can't yet act and when client sends moves.

commit 88770a9dbbe80d2d6364cd8402f4cc2e2f2ec367
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 13:03:54 2019 -0700

    wip: create local copy of inDuplicateMode var

commit d157f114b1e1fb91da015bb6238c70c61b58b154
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 12:38:00 2019 -0700

    wip: fix misplaced assert

commit 2f7230472f846ca29c791c9799a070415271e940
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 12:08:39 2019 -0700

    wip: fix non-dup-mode scores and enable undo

commit 23a11e65e218762408315bbba1ef3d0b0f6808f1
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 11:16:05 2019 -0700

    wip: list all players in a tie

commit 250bc52a044b89f8c39f2bf9a29cd0ce58b2d1a5
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 10:58:40 2019 -0700

    wip: better last-move explanations

    on android and linux. Required passing an array through the JNI which in
    turn encouraged some refactoring.

commit 9cddab3be0164028a30997b5528bfc3334488dae
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 10:22:21 2019 -0700

    wip: use only one ASSIGN in duplicate mode

    They're otherwise all the same, and the other types all have
    playerNum == DUP_PLAYER, so let's be consistent.

commit df50f81db9eace30884613ef4d9ec1c10904f1d9
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 08:47:59 2019 -0700

    wip: call assertSorted() before scoring

    the place that was the original problem

commit ccb026b82ebe600a697f36f67ccab250ac49b32c
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 08:43:31 2019 -0700

    wip: fix so MoveInfo tiles always in order

    Display of last-played move didn't work for duplicate case because
    scoring assumes sorted tiles. So always sort, and assert sorted when
    writing to and reading from stream.

commit a0967512f60354afd15ef6877f48bcc891a1d6d2
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 08:58:44 2019 -0700

    wip: script progress shows dup- vs non-dup-mode

commit 947594afb0b1c681743fbe274d58ded302f1414a
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 08:18:19 2019 -0700

    wip: allow mix of dup- and non-dup games in test script

commit a433cb230008a6cea8236c56a3d04c97a7702a80
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 08:03:35 2019 -0700

    wip: work around misunderstood NPE (not dup-only)

commit a54a015983890338772de5043bb242aa8ebeb202
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 08:03:14 2019 -0700

    wip: cleanup and add debug/logging util

commit 28c13b678f36c4c4678b1467e68daf3297db0464
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 07:58:14 2019 -0700

    wip: don't exit engine when checking tray in dup mode

    Android tends to abort the search because it has UI events
    unprocessed. I'm hoping it's generally so quick that this is ok. If not,
    I'll need to be more clever, e.g. adding an option to end the search
    after finding only one move rather than the best move.

commit c807cb91d25a789fd3ce0e739ad864b6e84631e6
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 07:47:04 2019 -0700

    wip: fix broken compile

commit 960dacdd5d7882f0b9cca9b5ad3e884bb04b9873
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 07:18:24 2019 -0700

    wip: fix pool having too many tiles when engine busy

    Bad loop structure meant I exited only after replacing in pool tiles I
    was actually keeping.

commit 8ff5a5b27d319b55730688dc6e4bfd9a7eef59db
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 19:31:34 2019 -0700

    wip: don't include number of players figuring pass count

    otherwise we wait too long for duplicate mode game to end

commit 19677f2bb6a2eabb80d99d55087621f483cd3e07
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 19:30:41 2019 -0700

    wip: log tile sets in and out

commit 9a0993ec30cb109c2171f141341f3e926ff801f9
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 19:29:32 2019 -0700

    wip: no longer generate trades randomly

commit 2fc37b1f94c966669119e9f7b31ce8fa2d2971e0
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 19:19:06 2019 -0700

    wip: figure bits-per-tile correctly

commit 295579d06a512d0a0012e725f42994e4b78436fa
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 08:52:49 2019 -0700

    wip: flag dup-mode games and nuke all on demand

    Add a bit to a summaries table field so dup-mode games can be
    identified. Add disabled code to nuke them all without attempting to
    open, something that still needs doing on occasion.

commit ddb73d9ccf66fd516ff10394cddb8f99956d99d5
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 3 17:39:21 2019 -0700

    wip: get rid of new move types

    It's enough to know whether we're in duplicate mode at runtime, as
    confirmed by the assertions from the last commit.

commit 70918077c13eebc1651a607da326eaba97fc6813
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 3 12:10:35 2019 -0700

    wip: assert new move types are redundant

    Looks like I don't need them: I can know whether I'm in duplicate mode
    or not and interpret them appropriately. This commit is to check; next
    will remove the types.

commit de677d7276be4a78e1819920403a93fe8ca36a13
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 3 11:23:38 2019 -0700

    wip: don't dup-trade when no tiles left in pool

    and don't count dup-trade as a pass when deciding whether to end game.

commit 6914822fcb1256afb84933c0937eeecd0d906aa6
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 3 11:00:38 2019 -0700

    wip: trade when nobody can move

    Add a new move type, duplicate-trade. Generate and transmit one of those
    when none of the submitted moves scores any points. And for testing,
    randomly do it in DEBUG builds occasionally (should likely be a param
    passed by the test script instead.) Still generates a very few
    assertions run from the script, but worth snapshotting still.

commit 683fb31f2288b3767d1b8495c9ed71030556b018
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jun 2 10:09:26 2019 -0700

    add prefs settings to unhide dup mode and for new-game default

    For now, it should be hard to stumble onto it, so add a debug-only
    setting so that all options are hidden by default. And so if you are
    using it it's easier to use, add a new-game default setting (itself
    hidden at first via the above.) Eventually I suspect it'll be easier to
    find for French-localized devices.

commit e7816d7587b582311a79e253c55e916f32c84c4d
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 29 10:03:13 2019 -0700

    cleanup

commit 78518d2af7c7787d46025ddee85401bdc75d7be7
Author: Eric House <xwords@eehouse.org>
Date:   Tue May 28 06:54:17 2019 -0700

    fix obscure NPE (not duplicate-specific)

commit d4f9bb2be51bd57fe87e1d5157e9e6eb408df528
Author: Eric House <xwords@eehouse.org>
Date:   Tue May 28 06:44:57 2019 -0700

    wip: fix NPE setting title too early

commit d02a2bf9b27544b8102025f599754d03797addb7
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 20:12:14 2019 -0700

    wip: fix crashes and stalls script found

    I was using a non-local player's model as scratch then failing to fully
    update it before loading the winning tray in.

commit 4e611150248cb4b1d20281e73e68b0f44a6fca1e
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 14:38:12 2019 -0700

    wip: add strings where test script can find them for dup games

commit 0685d64f9c7e17735bb651722b99f645aefe8ce8
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 14:36:44 2019 -0700

    wip: fix assert when no tiles in move

commit e02436fd7135b7c9fb799f1f8a1c91e0d7abb5ea
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 08:55:03 2019 -0700

    wip: mark duplicate games a bit

    Add "(dup.)" to game title and new string to the commit confirm alert.

commit ef32d09205d126338046f45aec34d44853523a9f
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 08:51:39 2019 -0700

    wip: fix tray-check bugs

    Needed to run the engine against the tray of the winning move, even if
    it wasn't local. Engines haven't existed for non-local players before so
    some assertions weren't happy.

commit f0a03d41602037150c9f9872a7b6a5e1cd44e038
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 08:11:13 2019 -0700

    fix to compile on Android

commit c442c92ab18e021743636e09956230fc78eb45fc
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 06:53:55 2019 -0700

    fix breakage from too-eager refactoring

commit eff9e3aee484d8c2159b6c59d5fd4a734dc5a77f
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 26 19:51:21 2019 -0700

    wip: refetch new tiles if current tray doesn't allow any moves

commit 47be80c68382dc1ac7c6a648f82e597bd0dde0df
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 25 13:34:24 2019 -0700

    wip: add logging trying to catch stall

commit ccdb3a9d21d0d0a7de2fd3588dcb64754f747ad0
Author: Eric House <xwords@eehouse.org>
Date:   Fri May 24 06:54:04 2019 -0700

    wip: include dupMode in BT and SMS invitations

    Add it to the json and url read/write code so other invitation types
    also work.

commit 959895981505b9a5e58d9212e76bfb7c6f491f34
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 23 20:34:33 2019 -0700

    add option to have all robots at full smartness

    as a test of duplicate, makes all scores the same

commit bd520de6f83d7dd718cd5a50fe16d5414ce63654
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 23 20:33:55 2019 -0700

    wip: fix method-name parens assert printf

commit d8196e9fc252d488b2d42527a734ace9926517cd
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 23 20:33:37 2019 -0700

    wip: remove some logging

commit 4fa394f342b000d7ee44b42a513ea97f9f2d414e
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 22 19:43:52 2019 -0700

    wip: add ability to run test app in duplicate mode

    Doesn't come close to passing :-(

commit cb920e34ee9e3ab3000c89370d722a6a48abfdf5
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 22 16:47:20 2019 -0700

    wip: report scores when move over (sorted by score)

    Still need to made the strings localizable.

commit c3e72140a1966f53b165ff43d8b9e59951e65c94
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 22 13:57:45 2019 -0700

    wip: fix problems opening old-version move stacks

    Since the stack's not rewritten each time it's saved (moves stay in the
    stream) the versioning scheme can't work. Instead use an extra bit to
    store whether the stack uses the new format requiring an extra bit for
    moveType.

commit b635c176820916b344657e9146fb28b998adb9f5
Author: Eric House <xwords@eehouse.org>
Date:   Tue May 21 18:48:31 2019 -0700

    wip: fix end-of-game message and initial turn assignment

commit 8bccd4e482fd48307ed22f5d9bc36966667f0084
Author: Eric House <xwords@eehouse.org>
Date:   Tue May 21 18:10:48 2019 -0700

    wip: UI doesn't need to always show the same turn

    Figure what "turn" it is based on what candidate moves have been
    reported locally. Fixes Android not showing games as needing attention
    on all devices.

commit 909ce7ed7ab13317cbc51288ed71e97a4571414c
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 20 21:37:22 2019 -0700

    wip cleanup

commit 6c5f4847a463a4d2022384677402d83ee1f87d1a
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 20 20:26:08 2019 -0700

    wip: split method

commit 4d489591eb6fc6233d413cc906f84fe3e099b701
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 20 19:49:33 2019 -0700

    wip: update scoreboard and end game correctly

commit 4c3aaa741bb903c8c1c74c4156ea626c4a0d3986
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 21:15:56 2019 -0700

    wip: don't allow trade in dup mode

commit ea7b3495080fafe91722d2ce51299bf49e3119de
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 21:09:30 2019 -0700

    wip: get building/limping along on Android

    parity with GTK, basically.

commit 72d493588d518868955296fd59033fd6dc763268
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 17:57:45 2019 -0700

    wip: break point tie based on word length

commit 08101b4e468efdd2b4b17f85a1492526993be978
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 17:12:28 2019 -0700

    wip: fix networked games

commit d83094bfe750560b868d1915d4375a65120817da
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 16:28:46 2019 -0700

    wip: fix problems updating model

    Simplest test case now works: two-player one-device game in duplicate
    mode can make a bunch of turns. Save/restore of game works. All on gtk;
    Android likely doesn't build.

commit 8f7a00f1eecba537061fc8e22f3eb44591152cfa
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 18 10:38:37 2019 -0700

    wip: tweak commit of dup move

commit b3212792311e69b2253832aedb052b6cc3c86eb9
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 18 10:23:08 2019 -0700

    wip: correctly update board with dup move

    and fix crash when move stack created with wrong version

commit 449f6f6ff4402ddc9581822ecbde9bb51120db85
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 18 09:10:31 2019 -0700

    wip: update scores correctly when loading stack

commit 0c83965fe8fba7c7aea7407ce6dfb37bc0add39f
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 18 08:40:29 2019 -0700

    wip: add dupe-mode move to move stack

    Add new move entry type including a move and new tiles plus the scores
    for all players. Reflect move and tiles when loading from file. Next:
    figure out what to do with the scores.

commit 78edef74a2c19e4d513fea9da0c6ede4cc146b87
Author: Eric House <xwords@eehouse.org>
Date:   Fri May 17 10:20:18 2019 -0700

    wip: identify highest-scoring word

commit ac7c0b0fb543576e2121dbbeaf17bb3a13cb19c6
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 16 21:34:04 2019 -0700

    wip: transmit client dupe-mode moves to server

    and fix failure to get dupe flag into server on client side

commit de85dfaa2f484a1a02cd6997a7e732daa28de16b
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 16 19:54:41 2019 -0700

    wip: invitation works to assign tiles

    Include in nli sent across that we're in DUPLICATE mode. When sending
    and receiving assigned tiles in that mode, send only one set and remove
    from pool only once. But: games don't always connect, which might or not
    be due to these changes. Next: handle commit by sending the move but not
    a new tray.

commit dcb9e8f14d14749f81c63e08eed8418719555fb8
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 16 19:46:25 2019 -0700

    wip: remove excessive logging

commit 67c62d84f1dfe2bc11463316697a0c62d449e429
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 16 08:15:20 2019 -0700

    wip: accumulate local turns

    Track whether players have committed turns yet. Once all have
    notice (but do nothing yet).

commit d8dcb43dbc396c0f8fdb9a890b958f168137c2ad
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 15 22:24:04 2019 -0700

    wip scoreboard shows it can be multiple players' turns

    modify how scoreboard is drawn. next: let players commit until all are
    done

commit 97ecc7bd81bac2a0832dfa01df3d7130547a1829
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 15 20:05:25 2019 -0700

    wip: add duplicate checkbox and assign same tiles to all

    next: make it everybody's turn until it's nobody's. This is all in
    standalone mode for now.

commit bd3b3e75ef6a0bbf4de20cbdc1aaabb9adae2a9c
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jul 21 12:08:33 2019 -0700

    wip: add clear 'X' to [un]pause msg editor

commit a0999d6af44d126fb450b220b49a743a3c7e439c
Author: Eric House <xwords@eehouse.org>
Date:   Sat Jul 13 10:11:17 2019 -0700

    wip: stop using IMPORTANCE_HIGH: too obnoxious

commit 3a7fd5758ffdaabf4b867f423db2d5558d1f10c0
Author: Eric House <xwords@eehouse.org>
Date:   Sat Jul 13 10:10:53 2019 -0700

    wip: move misplaced assert

commit d769855259daf340446e8c69b8091eec1cbc5d73
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 12 12:06:10 2019 -0700

    wip: store the damned playerNum already

    And remove mistaken minus-sign (typo?)

commit 9622a575863393668ac91a6233e5962ca413c8f8
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 12 11:47:27 2019 -0700

    wip: use rowid for notification id where possible

commit 699b76db2683f7ee9c96adb6d00e9ad623275fba
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 12 10:53:50 2019 -0700

    wip: be smarter about looking for timer changes

    Add a dutil callback for when timer value changes. In it, pass the new
    value to DupeModeTimer. In that, don't bother servicing until the saved
    value matches the stored/expected value (because there's otherwise yet
    another save coming.)

commit 25d3bc0a78557957c1cc4f1c727e581491bc969c
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 12 10:48:59 2019 -0700

    wip: add unique notification id generator

    I'm tired of trying to keep rowid-based notifications from trampling
    each other. Now they can be unique per-channel.

commit 5b2f692adaddf1cfe58f073fa4ea4e39f31b7785
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jul 11 23:55:54 2019 -0700

    wip: auto-pause when nobody moves

    If moves all come in 0 and the timer's running, assume nobody's actually
    playing and pause the game. While at it added [un]pause to game history
    and made history entries include malloc()'d message, requiring a
    free(). Lots of changes, with at least one glitch that games sometimes
    hang after the autopause; and gameslist shows it as nobody's turn though
    when opened the game knows it's a player's turn.

commit 1db4b1a3221f077cb797cc8e1c9a0468a9bc7f1f
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jul 8 20:40:11 2019 -0700

    wip: cleanup/refactor

commit 873dbf3e7c46dbe9bf0cd7163788f9c0f35b32ea
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jul 8 20:23:58 2019 -0700

    wip: run dupemodetimer more than once

    Failure to reset a variable meant I never processed more than one timer
    firing. Oops.

commit 0f13c4b95caa23ef19eae9454d034d5a881a7e20
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 20:03:57 2019 -0700

    wip: zero timer value when move's been made

    Used to actually set the timer value to 0 when move was made, and
    DupeModeTimer expected that. So zero the stored value before returning
    it IFF move's been made already.

commit 83761f9228828fa0ff51bd7595059912e76414bc
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 19:48:29 2019 -0700

    wip: add pause button to notification

    Make it easier to discover pausibility by adding pause button to
    always-on notification. Implemented by opening the game and then within
    it the Pause confirm alert, which required passing a boolean Extra
    through from the launch intent to the one passed into BoardDelegate.

commit 6e543978b1ab132b8f95ae756301555f6267b037
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 14:31:43 2019 -0700

    wip: fix to redraw timer when only turnDone changes

commit b3c79de07e9eeb2bbaed04ff9a46b91fb927fe3f
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 13:36:06 2019 -0700

    wip: fix compile

commit d293864cff6d20197703ccadaa9f75b91e634004
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jul 5 11:43:13 2019 -0700

    wip: show timer when paused, and dim when turn done

commit 9c25d5a79e39fad12054be0be3f3d33a569270a9
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jul 1 21:01:09 2019 -0700

    wip: save separate excuses for pause and unpause

commit 9dfc00f4ff462a949ac453680ce160d436da430e
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jul 1 21:00:20 2019 -0700

    wip: invoke pause stuff via tap on timer

commit e80d443cf9583ab388a5b077dbb37d0ce024e2c1
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jun 30 20:39:17 2019 -0700

    wip: pass name with pause info for better notification

commit 511b319643482ef459b793cc37c6fefd585c18c1
Author: Eric House <xwords@eehouse.org>
Date:   Sat Jun 29 11:50:40 2019 -0700

    wip: improve pause/unpause confirm dialog

commit e63fc004c830f96ad87d29d26de55f9429a098e1
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 21:45:17 2019 -0700

    wip: pass just the message. Let client package it.

commit dc79c7698a3b810bb94c4c6b732aa1e470953887
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 21:41:24 2019 -0700

    wip: trigger notifications etc on pause change

commit 6654053dd9640b1c79830cfd2ccff6ee117d8bd6
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 21:18:13 2019 -0700

    wip: missing files

commit 9579766643a0b939b0ebccd6b94fc1cace3f1a1a
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 21:15:58 2019 -0700

    wip: pass explanatory message with [un]pause

commit 1b91ad47910e4f4e0e2bba06d72097e4e83013a5
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 15:28:55 2019 -0700

    set dbname in build.gradle

commit c6c8ace0404f4a39214f294d3a85634d0db2080c
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 28 10:00:25 2019 -0700

    fix crash on initial install

    uninitialized variable

commit b0bcec10a896532d3439b4045e3406c1f361477b
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 27 13:35:30 2019 -0700

    wip: fix too-frequent dupe-game checking

    Do it all on a a background thread, and never process a game that was
    added for processing while being processed. Fixes re-opening because we
    just changed it, but may miss changes that matter.

commit 5f327d2eeabd8761691439c77db74f45514a0bf9
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 27 11:10:14 2019 -0700

    wip: progress on timers

    Mostly fixing DupeModeTimer to do less on main thread.

commit 847773f19b803626e56e4ee44a5f77ba225a487b
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 27 07:14:13 2019 -0700

    use macro for callbacks (as elsewhere)

commit ff6a7430db4bb01e77b1f32efde801872995d709
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 22:34:34 2019 -0700

    wip: transmit [un]pause to other devices

commit e8138431307763ffee8c8cba49cc00f6c36b3fa8
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 17:15:55 2019 -0700

    wip: more timer tweaks

commit 7431f5b4ddb16ff3b646409f8a0c62c43d864810
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 15:01:04 2019 -0700

    wip: fix assignment to wrong variable

commit fc703b6072d2dd7066e5bc9f6708b5b5d9aa11f9
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 14:41:50 2019 -0700

    wip: wire up [un]pause menus in Android board

commit 0e53fbfcbe5bf8e4a1253e45a12b9b5a5fe1e5ad
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 11:09:19 2019 -0700

    wip: pause/unpause without communication

commit 571200bebedb7df5f7193996a0db46ba6b05d1b6
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 10:56:09 2019 -0700

    wip: start adding [un]pause support

commit dbe25a2a09beae6241cd59b322f29e532094a7ae
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 10:07:24 2019 -0700

    wip: fix to work when timer not set

commit 6a58736eae4948c4245f7154e9e54a53ab2a39e9
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 09:53:29 2019 -0700

    wip: show tiles face-up in history for dup-mode

    No point in hiding them when everybody has the same.

commit 0b80a9ddfdcefdade0cf882cd4cd5b21ee4a5825
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 26 09:47:19 2019 -0700

    wip: don't draw paused (0:00) timer in duplicate mode

    Required passing in a new boolean

commit 1e94137e670bef7ecda614d3b513c6c065245704
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 25 19:16:40 2019 -0700

    wip: adding timers

    interpret the existing timer value as per-move, counting down to 0. When the timer fires, commit and send moves for all local players.
    On Android, show notifications for games where a timer's running and nothing's been committed yet. Very rough, and somehow broke the
    python test script for duplicate games.

commit 61b81b820afe4e7c30234d0c6de428fcc41e2a70
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 25 16:40:14 2019 -0700

    fix crash closing app when timers enabled

commit d456444e33bdcf5b151e250a8afd536f52f0d362
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 24 12:23:33 2019 -0700

    assert thread is same for map and unmap

    It'll be a while before I'm comfortable moving this to main branch

commit c35de13cbaeb001d743bbfa00f6a95c16eb3a6fc
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 24 12:15:40 2019 -0700

    add refcount on thread->env mapping

    Just as a safeguard to ensure I'm not removing something I'll want
    later. There appears to be no attempt at this point to use a stacked
    protocol -- attempts to add what's already there are just dropped -- so
    actual refcounting isn't working now. But if I double-remove I want to know.

commit a43b811c3343c1b393c707197a59dc3c7c52d7ac
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 24 09:32:36 2019 -0700

    fix breakage from backport and rebase

commit 5dd2cf2a6209a6902ad7697b8831dfb998af42a8
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 24 09:13:17 2019 -0700

    add timer to gtk's new-game dialog

commit 6fbb0522d65d11752da8170511e78775fc5c16ea
Author: Eric House <eehouse@eehouse.org>
Date:   Sat Jun 22 20:29:26 2019 -0700

    tweak text

commit 9a4bf15f39e50eca71b489a771294b06787eba88
Author: Eric House <eehouse@eehouse.org>
Date:   Sat Jun 22 08:56:27 2019 -0700

    make all config spinners use same styles

    One had a label. How all do, and styles make them the same.

commit c9bf3b9d66cf4bf57fd8ab2a8311165a22ccfc5d
Author: Eric House <eehouse@eehouse.org>
Date:   Sat Jun 22 08:23:35 2019 -0700

    make label-plus-timer-setting single-line

commit ab47ad09612da9b5cad6e450ffedb3c51357431a
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 16:32:57 2019 -0700

    wip: specify smaller size to avoid wrap on some phones

    No idea if this will be enough. Or if just saying "one-line" would work
    better.

commit 18f60f13c11c5c87bb1cb89a34430bce4372f937
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 15:08:51 2019 -0700

    wip: fix false dup-mode tag in games list

    The layouts are reused, so it needs to be hidden for the non-dupe case
    in case it represented a dup-mode game before and the tag was revealed.

commit 4c77db51f3ab618375d1b4b709d4ce5492ce7e5f
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 14:50:15 2019 -0700

    fix listing of Hex language (not dup-specific)

commit df2006279f5203b28fae46f2cae5a99f83e80652
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 11:48:07 2019 -0700

    wip: fix div-by-zero when all games are duplicate

commit a13d2c630b0b5a78048663b77051e29855ad012d
Author: Eric House <xwords@eehouse.org>
Date:   Fri Jun 14 10:30:45 2019 -0700

    wip: store scores in as many bits as largest requires

    breaks storage format!

commit e1acb19d7de8b9f65f5727cd7b415dc6a05e5a1e
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 20:26:50 2019 -0700

    wip: reduce scores correctly in dup-mode after undo

commit c8783625b72b2469013db4ffbe33ce6f2bc129c0
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 18:26:15 2019 -0700

    wip: fix tiles not being sorted after undo

    I'm doing this in the model where there's no setting to prevent
    sorting. Figure undo's a violent enough change nobody will care.

commit 2a5f76e86a357194c46d7f41bf64fd8d9c238b62
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 17:49:00 2019 -0700

    wip: inval tray when copying from DUP player's

    Fix failure to correctly draw current tray contents after replacement
    based on winning dup. move.

commit d93ae745a011b22dd1970039577537a0b0162103
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 17:13:17 2019 -0700

    wip: mark gameslist items with "dup" if in dup mode

commit 5ab01db8227f16641f18b2dbe09decc5f1a10476
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 13 10:55:40 2019 -0700

    wip: correct move count display in dup-mode case

commit bcff165e45eb0d347303b581a882118a0c1efbf8
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 11 15:29:30 2019 -0700

    wip: fix crashes using word-lookup

    Assertions about dup mode and pending plays being legal words were wrong
    given how commitTurn() was used building a temp model inside
    model_listWordsThrough().

commit a3eb0723987b6abf36f5bfa9b1536ee13fd12ccc
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jun 9 14:43:28 2019 -0700

    print average scores at end of run

    Should really be done separately by number of players, as non-dup games
    with more players will have lower scores as each has fewer turns.

commit f764362e435d644ee1014e22aba7075452c54558
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jun 9 10:30:26 2019 -0700

    wip: notifiy turn change listeners in DUP case

    Fixes occasional failure to update Exipration display in game list items
    when a move's made.

commit 4cb91d72259d7b3190205cc93974ad1052c8d883
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 22:16:23 2019 -0700

    wip: don't cache variable locally

    For some reason it's not set on K's phone. This is safer: what's always
    worked, and it's late....

commit d78fee9a43cf0f6019f6a9494edc4a0573f6317d
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 19:07:11 2019 -0700

    wip: move status strings into resources

commit f943a8ca280da3dce0b843a14fbed307814347e0
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 18:43:56 2019 -0700

    wip: add status alerts for dup state transitions

    So users know what's up, add not-again alerts when server gets moves but
    can't yet act and when client sends moves.

commit 61bc587d656b47b194306ae9c6f10dc6a50878c7
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 13:03:54 2019 -0700

    wip: create local copy of inDuplicateMode var

commit 5b37bb2cd45ca281f410487d63a328eb80b518d9
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 12:38:00 2019 -0700

    wip: fix misplaced assert

commit dddcd5c073f4ee55d2367728381ef400faa6bc0e
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 12:08:39 2019 -0700

    wip: fix non-dup-mode scores and enable undo

commit 09848e3a85635238df9ebc7b0f2c480c4f2db02a
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 11:16:05 2019 -0700

    wip: list all players in a tie

commit 9d87087924fec2d0262ecc1ee2d3bb7d82d3c4c2
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 10:58:40 2019 -0700

    wip: better last-move explanations

    on android and linux. Required passing an array through the JNI which in
    turn encouraged some refactoring.

commit 57b8c65de433cd694d978726257dda07d5918cef
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 10:22:21 2019 -0700

    wip: use only one ASSIGN in duplicate mode

    They're otherwise all the same, and the other types all have
    playerNum == DUP_PLAYER, so let's be consistent.

commit 0d50b662a1290a5e58ee6229e1f9ad41de1eb5f3
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 08:47:59 2019 -0700

    wip: call assertSorted() before scoring

    the place that was the original problem

commit 78fc93e19658eb015ebb546e6bc3190a470bc2e5
Author: Eric House <xwords@eehouse.org>
Date:   Thu Jun 6 08:43:31 2019 -0700

    wip: fix so MoveInfo tiles always in order

    Display of last-played move didn't work for duplicate case because
    scoring assumes sorted tiles. So always sort, and assert sorted when
    writing to and reading from stream.

commit 882c7ff9d60a5d5c79c6c35b54d9d84d19912d4e
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 08:58:44 2019 -0700

    wip: script progress shows dup- vs non-dup-mode

commit 7b4bf585d4bdc3d77d858289f9c043552a41d027
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 08:18:19 2019 -0700

    wip: allow mix of dup- and non-dup games in test script

commit 874b2bafc2b466f2bd2086a239942a350b93f1dd
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 08:03:35 2019 -0700

    wip: work around misunderstood NPE (not dup-only)

commit 185a6d374fc49a955bbea90e086fd1570d023627
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 08:03:14 2019 -0700

    wip: cleanup and add debug/logging util

commit a2a8dfcbd30d53bdac170e057605a683f3f30323
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 07:58:14 2019 -0700

    wip: don't exit engine when checking tray in dup mode

    Android tends to abort the search because it has UI events
    unprocessed. I'm hoping it's generally so quick that this is ok. If not,
    I'll need to be more clever, e.g. adding an option to end the search
    after finding only one move rather than the best move.

commit 44c7528995327c9653dc69f60986f18442e232de
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 07:47:04 2019 -0700

    wip: fix broken compile

commit 1bbc1607914993565c86d8b86da78b490e08d3f4
Author: Eric House <xwords@eehouse.org>
Date:   Wed Jun 5 07:18:24 2019 -0700

    wip: fix pool having too many tiles when engine busy

    Bad loop structure meant I exited only after replacing in pool tiles I
    was actually keeping.

commit 021f5afc8d4a871d42aa619be02b80fab7e2415c
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 19:31:34 2019 -0700

    wip: don't include number of players figuring pass count

    otherwise we wait too long for duplicate mode game to end

commit 1294b3bb0a4272e0bfb87f81ef5f9fe957d78b2e
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 19:30:41 2019 -0700

    wip: log tile sets in and out

commit a01c50405e1edcfba4bb2fc89f4df0801226f5d5
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 19:29:32 2019 -0700

    wip: no longer generate trades randomly

commit aeae0164c3c7e940430d72c000e2a66baf5f1dd5
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 19:19:06 2019 -0700

    wip: figure bits-per-tile correctly

commit cb3bb8d55b9cae577941ab8707a91566f42a14f9
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 09:12:52 2019 -0700

    log service stalls that don't trigger notification

    I'm seeing RelayService never get scheduled, and need to see something
    in the logs.

commit a8e0b43d004b2556ab4b22ab52be0ad7e3ddb45d
Author: Eric House <xwords@eehouse.org>
Date:   Tue Jun 4 08:52:49 2019 -0700

    wip: flag dup-mode games and nuke all on demand

    Add a bit to a summaries table field so dup-mode games can be
    identified. Add disabled code to nuke them all without attempting to
    open, something that still needs doing on occasion.

commit 4e4bcd5d4590d0b429405a6a0a5de10f1a29689d
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 3 17:39:21 2019 -0700

    wip: get rid of new move types

    It's enough to know whether we're in duplicate mode at runtime, as
    confirmed by the assertions from the last commit.

commit 7343ba3de1941a2b9d8fcd196506c9f62acbfe91
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 3 12:10:35 2019 -0700

    wip: assert new move types are redundant

    Looks like I don't need them: I can know whether I'm in duplicate mode
    or not and interpret them appropriately. This commit is to check; next
    will remove the types.

commit 07ae965094c720ebb71b2dd6c5e9a6facf854888
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 3 11:23:38 2019 -0700

    wip: don't dup-trade when no tiles left in pool

    and don't count dup-trade as a pass when deciding whether to end game.

commit b8cbfd0149f9c8e9854ae15dddc8328832f7d8a0
Author: Eric House <xwords@eehouse.org>
Date:   Mon Jun 3 11:00:38 2019 -0700

    wip: trade when nobody can move

    Add a new move type, duplicate-trade. Generate and transmit one of those
    when none of the submitted moves scores any points. And for testing,
    randomly do it in DEBUG builds occasionally (should likely be a param
    passed by the test script instead.) Still generates a very few
    assertions run from the script, but worth snapshotting still.

commit 41f0258619a1f3ab72abd3d908d0b6cf2f999978
Author: Eric House <xwords@eehouse.org>
Date:   Sun Jun 2 10:09:26 2019 -0700

    add prefs settings to unhide dup mode and for new-game default

    For now, it should be hard to stumble onto it, so add a debug-only
    setting so that all options are hidden by default. And so if you are
    using it it's easier to use, add a new-game default setting (itself
    hidden at first via the above.) Eventually I suspect it'll be easier to
    find for French-localized devices.

commit e152b407005e837eec4fe1f6ad552f55c157d877
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 29 10:03:13 2019 -0700

    cleanup

commit 4439d8c3ea786b64dde554a25c62379bbea8347d
Author: Eric House <xwords@eehouse.org>
Date:   Tue May 28 06:54:17 2019 -0700

    fix obscure NPE (not duplicate-specific)

commit 4c5b1fc25d74f0ab40072f0d1987234e78b05569
Author: Eric House <xwords@eehouse.org>
Date:   Tue May 28 06:44:57 2019 -0700

    wip: fix NPE setting title too early

commit cc06a3df70157e3fd4c5b7f12d3adc8cfb87aa1c
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 20:12:14 2019 -0700

    wip: fix crashes and stalls script found

    I was using a non-local player's model as scratch then failing to fully
    update it before loading the winning tray in.

commit 7010cd60af70965ac106072ca2eed91536c746d5
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 14:38:12 2019 -0700

    wip: add strings where test script can find them for dup games

commit 1349d300b74168e2cae3c564fcbcec6fb28264c3
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 14:36:44 2019 -0700

    wip: fix assert when no tiles in move

commit 8a789ef9c32d4d90ef7f054dc8d863902edc34eb
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 08:55:03 2019 -0700

    wip: mark duplicate games a bit

    Add "(dup.)" to game title and new string to the commit confirm alert.

commit 4ac09cf8daf8752106d1edf9a90e0f12fe3bc80a
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 08:51:39 2019 -0700

    wip: fix tray-check bugs

    Needed to run the engine against the tray of the winning move, even if
    it wasn't local. Engines haven't existed for non-local players before so
    some assertions weren't happy.

commit 99abae4d19383afe25a9fbe57960ec0f8530f49e
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 08:11:13 2019 -0700

    fix to compile on Android

commit 22a58978dd1a6d851a5f92557928d5418d42a57a
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 27 06:53:55 2019 -0700

    fix breakage from too-eager refactoring

commit d2f1a8d7c2c90e94bc00b170d69faa6f9b3e69e1
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 26 19:51:21 2019 -0700

    wip: refetch new tiles if current tray doesn't allow any moves

commit c4c916c9f96231d9a2fd085df1aef8b54237ab4f
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 25 13:34:24 2019 -0700

    wip: add logging trying to catch stall

commit 8355236bdc5b34e5a58594dfec982cf0cd3daa8a
Author: Eric House <xwords@eehouse.org>
Date:   Fri May 24 06:54:04 2019 -0700

    wip: include dupMode in BT and SMS invitations

    Add it to the json and url read/write code so other invitation types
    also work.

commit b8fb1d4c89285e0516aa55f830954dac16dbe7cc
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 23 20:34:33 2019 -0700

    add option to have all robots at full smartness

    as a test of duplicate, makes all scores the same

commit e653ad39284c5ba071e74a521a91d5bb21fbe320
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 23 20:33:55 2019 -0700

    wip: fix method-name parens assert printf

commit fca3c06ff3007c3095128b27040d87e82eddf79b
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 23 20:33:37 2019 -0700

    wip: remove some logging

commit 1a89b105d34ba0af2048b7693a3fdbeda7783070
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 22 19:43:52 2019 -0700

    wip: add ability to run test app in duplicate mode

    Doesn't come close to passing :-(

commit 308baf2a8b2cbdc1212cff17811ee6f750c67099
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 22 16:47:20 2019 -0700

    wip: report scores when move over (sorted by score)

    Still need to made the strings localizable.

commit 2db4bdceaba990f34dd32afb16f9d4bd04fd8cdc
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 22 13:57:45 2019 -0700

    wip: fix problems opening old-version move stacks

    Since the stack's not rewritten each time it's saved (moves stay in the
    stream) the versioning scheme can't work. Instead use an extra bit to
    store whether the stack uses the new format requiring an extra bit for
    moveType.

commit 1df8e1754e35b784be2070c8416c6f5038fa65a7
Author: Eric House <xwords@eehouse.org>
Date:   Tue May 21 18:48:31 2019 -0700

    wip: fix end-of-game message and initial turn assignment

commit 4548435b36e9f9165b66832b93707a0b7e00f876
Author: Eric House <xwords@eehouse.org>
Date:   Tue May 21 18:10:48 2019 -0700

    wip: UI doesn't need to always show the same turn

    Figure what "turn" it is based on what candidate moves have been
    reported locally. Fixes Android not showing games as needing attention
    on all devices.

commit 4a93f4b4528eabcef41bdfd67517bba4d1479407
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 20 21:37:22 2019 -0700

    wip cleanup

commit f8184783bc9a8914310c39c54084e5fe492694a7
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 20 20:26:08 2019 -0700

    wip: split method

commit 0d7d68737843017ecbc08dba87d881dabf7098ff
Author: Eric House <xwords@eehouse.org>
Date:   Mon May 20 19:49:33 2019 -0700

    wip: update scoreboard and end game correctly

commit d5d95424314b2e18c95f0a43eaa1759b3a7c6b5a
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 21:15:56 2019 -0700

    wip: don't allow trade in dup mode

commit 8b102c0a8e5c0b39cc5b29aea16a5985a0e402c6
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 21:09:30 2019 -0700

    wip: get building/limping along on Android

    parity with GTK, basically.

commit 16cfc6b0bb1bb01ee801ccec2116eac94e16fdab
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 17:57:45 2019 -0700

    wip: break point tie based on word length

commit 66dce87d98dce21d7616cc79c32ee88e8fbbb537
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 17:12:28 2019 -0700

    wip: fix networked games

commit 33ba891082a9d59a90115357194841f8fa0532f8
Author: Eric House <xwords@eehouse.org>
Date:   Sun May 19 16:28:46 2019 -0700

    wip: fix problems updating model

    Simplest test case now works: two-player one-device game in duplicate
    mode can make a bunch of turns. Save/restore of game works. All on gtk;
    Android likely doesn't build.

commit 33080c1014e40af0858a1d89168ffd52d1efd400
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 18 10:38:37 2019 -0700

    wip: tweak commit of dup move

commit 65f06a216441624f811d1abb2e31955fb979b5c5
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 18 10:23:08 2019 -0700

    wip: correctly update board with dup move

    and fix crash when move stack created with wrong version

commit 4be132686b64cf6c49e541ad7df76bb7b753b3ce
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 18 09:10:31 2019 -0700

    wip: update scores correctly when loading stack

commit 107f7b2a6708c1129f8fd67dc2deecb9e19a0606
Author: Eric House <xwords@eehouse.org>
Date:   Sat May 18 08:40:29 2019 -0700

    wip: add dupe-mode move to move stack

    Add new move entry type including a move and new tiles plus the scores
    for all players. Reflect move and tiles when loading from file. Next:
    figure out what to do with the scores.

commit 6c05fe87d3ddae3e74edf0621df40dd083c9bebb
Author: Eric House <xwords@eehouse.org>
Date:   Fri May 17 10:20:18 2019 -0700

    wip: identify highest-scoring word

commit 4e498f754d637a15c63ec8498bad35c58f348a45
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 16 21:34:04 2019 -0700

    wip: transmit client dupe-mode moves to server

    and fix failure to get dupe flag into server on client side

commit 225b0f579d0c9aae85f439739d686b8afda7b6e3
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 16 19:54:41 2019 -0700

    wip: invitation works to assign tiles

    Include in nli sent across that we're in DUPLICATE mode. When sending
    and receiving assigned tiles in that mode, send only one set and remove
    from pool only once. But: games don't always connect, which might or not
    be due to these changes. Next: handle commit by sending the move but not
    a new tray.

commit 7e7b5d65e2fd4ccaf6657d88c9c9e1c59adc8c4f
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 16 19:46:25 2019 -0700

    wip: remove excessive logging

commit 8afc11dc54c5aa145066729594fb741cf9e51c2c
Author: Eric House <xwords@eehouse.org>
Date:   Thu May 16 08:15:20 2019 -0700

    wip: accumulate local turns

    Track whether players have committed turns yet. Once all have
    notice (but do nothing yet).

commit d7697fba6f7bffc37d2ee09d9b397c1bb04cdf4b
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 15 22:24:04 2019 -0700

    wip scoreboard shows it can be multiple players' turns

    modify how scoreboard is drawn. next: let players commit until all are
    done

commit eaa551d1d587fba90bb6cf960b4321949d173ef5
Author: Eric House <xwords@eehouse.org>
Date:   Wed May 15 20:05:25 2019 -0700

    wip: add duplicate checkbox and assign same tiles to all

    next: make it everybody's turn until it's nobody's. This is all in
    standalone mode for now.
2020-01-30 16:00:56 -08:00
Eric House
752e3ff3e8 remove use of --slow-robot
breaks things for reasons I need to debug later
2020-01-29 20:40:14 -08:00
Eric House
3f5b9f5992 get "sms" games going on curses 2020-01-29 20:40:14 -08:00
Eric House
ca8c84b9ae make it possible to run without an open game 2020-01-29 20:40:14 -08:00
Eric House
f60914ac85 include redirection in script 2020-01-29 20:40:14 -08:00
Eric House
e91a66b48a cleanup 2020-01-26 22:21:32 -08:00
Eric House
9e09d9cd47 make alt-return like long-tap to get prev score
The hack to pass alt modifier with key might work for others, but for
now it's used in that one place.
2020-01-26 22:12:36 -08:00
Eric House
4bc39a0291 copy in some missing config 2020-01-26 21:00:05 -08:00
Eric House
dd1e91301a add show-tiles; make cells square
draw will be responsible for wrapping stuff like Catalan's L-dot-L.
2020-01-26 07:53:12 -08:00
Eric House
a398cffaa5 fix some menus, hide others that don't work 2020-01-25 09:19:19 -08:00
Eric House
b78ad28d0e draw multi-type cell contents correctly
As long as it's not too long for the space! But the curses draw function
that knows how to measure the length-in-bytes of a multi-byte string
doesn't seem to be available to me. So pass -1 as the length and it'll
draw correctly out to the NULL terminator.
2020-01-24 21:57:35 -08:00
Eric House
b96c9cc438 fix flip 2020-01-24 09:22:49 -08:00
Eric House
598be04bef make curses app more like the rest
Lots of changes adding a games-list view to the app from which you
create new games, open and delete existing ones, etc. There's still
plenty that's unimplemented, but it's already more useful for testing
and development. Which is the point.
2020-01-24 09:05:16 -08:00
Eric House
97bec5ca73 new script (mostly for use inside UserLAnd) 2020-01-12 12:12:55 -08:00
Eric House
9406297c03 transmit sms phone in nli (and hard-code port=1)
This fixes on gtk version being able to invite to an SMS game using
relayID. I don't know why not transmitting port is ok; maybe android
doesn't use the port or gets it some other way, e.g. it's hard-coded for
each variant.
2020-01-09 21:24:38 -08:00
Eric House
cdbf574c0e add new files device{c,h}
I've long wanted common code and state that outlast a single game. The
smsproto stuff is a step in that direction, but this file will be a
place for anything new. Starting, perhaps, with a mapping of deviceID ->
addressInfo (e.g. BT name or SMS number of opponent device) that will
let me stop duplicating that stuff in every game's comms state. We'll
see. It's guarded by a compile-time flag so I can play with in on the
Linux version until ready.
2020-01-08 11:20:51 -08:00
Eric House
68890cdf86 don't pass relayDevID unless inviting using relay
And do some cleanup to make things more clear
2020-01-08 11:20:51 -08:00
Eric House
2a54f6f176 cleanup: make linux more like android
Wasn't using the game_receiveMessage() utility
2019-12-14 10:55:05 -08:00
Eric House
c7ebe6e80e add debug-only pending-msg count to connstatus display
I'm bringing this in from another branch because it'll be useful for
debugging bluetooth problems.
2019-12-10 14:42:54 -08:00
Eric House
f8a84cbe0a adding missing DB field
Can't upgrade a game if the field's missing so just add it. Adding a
notion of versioning and upgrading isn't worth the effort.
2019-11-03 18:14:47 -08:00
Eric House
54e5ca361d remove unnecessary logging 2019-11-03 11:24:29 +00:00
Eric House
e37220cbb1 add ability to upgrade app during game
This was in the .sh version of the script but not the .py. Delete the
former too BTW.
2019-11-03 09:30:32 +00:00
Eric House
96ee5bec8c start adding logging specific to comms' windowing
(Hi from Santiago)
2019-11-01 07:22:56 -07:00
Eric House
8c16d1e749 fix dialog not exiting when close button called
Need to use gtk_dialog_run(), not gtk_main()
2019-08-19 07:50:33 +03:00
Eric House
489ac08289 remove logging 2019-07-24 07:49:29 -07:00
Eric House
a85cfef82d add missing .deb file 2019-07-24 07:49:03 -07:00
Eric House
25cce2c7f3 add timer to gtk's new-game dialog 2019-06-24 09:20:34 -07:00
Eric House
52d2694bc7 add support for 64-bit ARM
Add a third processor type to the .so, and fix first compile-time
warnings and then a few dumb bugs based on assumptions about ptr sizes.
Works to play networked games and browse wordlists, but is not
extensively tested and needs to be before release.
2019-05-29 19:19:00 -07:00
Eric House
e2cf25fc0a add menuitem to copy relayid to gtk clipboard
(I'm tired of typing it manually.)
2019-05-18 09:48:22 -07:00
Eric House
012ebe26f7 differentiate betweeen PENDING and RECENT tiles
Should not show the new you-can-lookup-uncommitted-words hint for
already-played words, so needed to be able to tell difference between
the two. Now you can -- and on the gtk side I draw them differently
because I can.
2019-04-09 09:51:04 -07:00
Eric House
ea1cc68eb0 cut logging in test app 2019-03-21 18:40:15 -07:00
Eric House
ce2ec03d3e relay tracks variantCode int, not string 2019-03-07 18:12:26 -08:00
Eric House
eeddd8d7cb fixing refcounting and adding logging
Seeing the occasional crash and trying to plug leaks that might be
contributing. I think I fixed the Gameptr.finalize() assertions I've
been seeing forever but the thread match assertion remains. Logs will
help catch that.
2019-03-03 14:40:07 -08:00
Eric House
b6551abd2f some cleanup, e.g. to assert my signals are valid 2019-02-22 21:25:26 -08:00
Eric House
97eb6018d9 comment out dead code I keep reading 2019-02-22 19:59:55 -08:00
Eric House
956e9c540f fix valgrind-noted empty array cruft. 2019-02-22 19:29:56 -08:00
Eric House
e6b59ea11d add debug-only option for invitee players to be robots
It's useful when testing to have the remote device play without human
interaction. So add an option, and UI to trigger it, for the players
created remotely in response to an invitation to be robots. There are
guards in place to catch the feature slipping into a release build.
2019-02-07 08:17:54 -08:00
Eric House
e04f8d7fba fix just the warnings; VSIZE is safe 2019-01-29 09:15:56 -08:00
Eric House
15a2897112 Revert "toward compiling with gcc8"
This reverts commit d293517e7c.
2019-01-29 09:05:54 -08:00
Eric House
d293517e7c toward compiling with gcc8
My VSIZE is no longer legal, and apparently there's no workaround (no
way to safely figure the length of an array whose size is known at
compile time.) To avoid the risk of duplicating little constants, added
macros that define length in a way a new VSIZE can pick it up. Couldn't
make that work for struct field arrays, however, so there I'm using
constants.
2019-01-28 17:24:53 -08:00
Eric House
b616f79cfd remove the last critical error 2019-01-27 09:23:56 -08:00
Eric House
f7b6d30dc2 fix another critical warning 2019-01-27 09:12:58 -08:00
Eric House
2b5b4ba982 fix gtk critical errors 2019-01-27 08:46:51 -08:00
Eric House
a14b43bba0 communicate variant to relay, and store in new column 2019-01-27 06:31:21 -08:00
Eric House
db641c4664 log gameSeed; generate on linux too
I'm seeing a rare case where a game connectes to relay specifying a room
and somehow gets both slots, having provided different gameSeeds the two
times. This means an opponent won't connect, the room being full in that
game. I can't reproduce, so am logging seed changes better and switching
linux client to leave seed generation to comms as Android does.
2019-01-08 08:16:50 -08:00
Eric House
454e3da578 fix to compile when #define not defined 2019-01-08 07:41:22 -08:00
Eric House
4a90792dec If game's in Spanish, don't require 7 tiles for trade.
Put up an error message if too many tiles selected for trade
(a condition that couldn't exist when the pool was guaranteed to
have at least 7 in it.) (It's a hack: there's not even an enum
giving Spanish's code, and the lang_locale stuff in info.txt isn't
making it into the .xwd format.)
2018-12-29 18:47:48 -08:00
Eric House
e9ae36f68d fix invite via relayID (linux test app)
I broke it adding SMS invite support?
2018-12-29 07:41:03 -08:00
Eric House
e637f49b95 include port and proto
Pretty sure couldn't have played against an older build without this.
2018-07-26 21:13:09 -07:00
Eric House
9ddc6e4b89 Move transision of cmd and gameid and port (pending) into smsproto
common code, simplifying and unifying what the platform-specific code
has to do. Seems to work.
2018-07-26 07:50:16 -07:00
Eric House
2d8ac995b7 add test case where (fake) sms messages never arrive 2018-07-14 15:43:42 -07:00
Eric House
89ec7987e6 move test to after db's inited to avoid crash 2018-07-13 18:20:56 -07:00
Eric House
9c2a722cc5 change two method names 2018-07-10 07:07:30 -07:00
Eric House
8c14ccc0d2 add new dutil to store by ptr; use for smsproto msgID 2018-07-10 06:36:34 -07:00
Eric House
13cc6c79f1 add save/restore of partial messages
Handles case where the app receives only a subset of the SMS messages
into which a larger game-level message has been broken. Now when it
restarts and the remaining parts come in the whole can be reassembled.
2018-07-07 22:56:32 -07:00
Eric House
1c58ab3d99 clean up linux db usage
For load/store I'll need more flexibility to store large values.
2018-07-06 08:04:53 -07:00
Eric House
1941642607 add load and store to dutils, and implement with stubs 2018-07-06 06:56:54 -07:00
Eric House
2e9fbb8204 add common implementation of the SMS proto stuff
And use in linux client. Goal here is to reproduce then improve the
Android SMS pre- and post-processing stuff with a common/ implementation
that can be tested on linux and used wherever.
2018-07-05 21:40:56 -07:00
Eric House
87418d63d1 fix linux "sms" and modify script to test it
My linux sms hack used inotify and didn't check for messages that were
there when the app launched. Replace inotify with a simple glib periodic
timer. A bit of latency mimics SMS better anyway. Update test script to
support SMS, and add params to and otherwise fix linux client so
everything works.
2018-07-05 21:22:20 -07:00
Eric House
d4436b7706 Break part of util into dutil
Trying to separate what's game-specific from what can be app/device
specific (i.e. with a long lifespan, and available when a game isn't
open.)

Android will be broken after this commit and fixed after the next
2018-07-05 07:58:50 -07:00
Eric House
d70b089835 use mem_stream_make_raw() where possible in linux code 2018-06-27 23:37:28 -07:00
Eric House
976db7b181 add mem_stream_make_raw 2018-06-27 23:24:45 -07:00
Eric House
d2ab796fac test script tweaks 2018-06-18 07:11:38 -07:00
Eric House
80167fb2d9 one more assert 2018-06-01 05:58:04 -07:00
Eric House
b7981cc8da print based on time rather than number of iterations 2018-05-31 23:06:51 -07:00
Eric House
ffaa47f893 fix creation of bogus game
Snapshot can be the first write. Save the rowid if it's new.
2018-05-31 22:19:03 -07:00
Eric House
b24d60e7bf add assert to verify no need for mutex 2018-05-31 21:23:25 -07:00
Eric House
dff130d6c6 ignore log dir 2018-05-31 21:23:10 -07:00
Eric House
d240e30bf4 test script: log and show tiles left in tray
Once the pool count drops to 0, start showing the number of tiles left
in the user's tray. This prevents there being a long time when nothing
seems to be changing *and* the script from exiting early because it
thinks all games are hung.
2018-05-25 21:36:25 -07:00
Eric House
1821d197b9 fix to compile on 32-bit system 2018-05-23 19:48:30 -07:00
Eric House
cee7d696fc fix stuff to make valgrind happy 2018-04-17 21:13:53 -07:00
Eric House
1b71198d4e add valgrind option to test script 2018-04-14 10:48:20 -07:00
Eric House
ca54371515 tweaks to test script
Make fewer games with > 2 players, as that's rare. Fix calculation of
total number of launches to include games that have ended.
2018-04-14 10:42:53 -07:00
Eric House
317df71588 more valgrind fixes 2018-04-14 10:17:12 -07:00
Eric House
05892c630e lazy: use glib to avoid gcc warnings 2018-04-14 09:39:27 -07:00
Eric House
3bb6f842b2 fix valgrind-flagged errors 2018-04-14 09:13:43 -07:00
Eric House
afbf5a2218 fix python script to catch relay.py errors 2018-04-06 21:50:13 -07:00
Eric House
89809e051d compile with latest gcc (untested on old) 2018-04-06 21:49:51 -07:00
Eric House
4504302b3b make "release" builds compile again
Release isn't really a thing on linux, but I'm fixing something that
only reproduces when DEBUG is undefined.
2018-02-18 11:30:54 -08:00
Eric House
19a6672785 don't show current players tiles in list of remaining 2018-01-18 22:02:06 -08:00
Eric House
af58110489 add missing deb packages 2017-12-20 21:45:20 -08:00
Eric House
da1c3f992a Merge branch 'android_branch' into relay_via_http 2017-12-15 07:20:53 -08:00
Eric House
2e71aedc02 fix --game-dict option 2017-12-09 21:32:05 -08:00
Eric House
8d10dca23e pull in test scripts from dev branch 2017-12-09 20:39:16 -08:00
Eric House
243eb213bb make reply messages a param within result
Makes it easier to debug by adding stuff on the relay end
2017-12-06 18:57:48 -08:00
Eric House
17d3f14d9e kill script when no change for two minutes
by default -- there's a flag for that too.
2017-12-03 17:05:02 -08:00
Eric House
45bb36e66c pad log and db file names for better sorting 2017-11-30 07:43:04 -08:00
Eric House
f1b91f4df2 exit if tile line hasn't change in 2 minutes 2017-11-29 20:39:15 -08:00
Eric House
12ab4bdc5c print total runtime on exit 2017-11-29 20:02:27 -08:00
Eric House
db0d5ef746 tweak display; add signal handler for clean shutdown 2017-11-29 19:32:27 -08:00
Eric House
f9c92ca34f tweak device-in-game summary
Group devices by game so connectivity is easier to watch.
2017-11-28 07:08:41 -08:00
Eric House
039dcdf0cc print how long run has left 2017-11-19 19:40:29 -08:00
Eric House
ae98425c21 output game progress as a table 2017-11-17 08:06:23 -08:00
Eric House
e7d00cbad4 fix TIMEOUT calculation 2017-11-16 08:29:22 -08:00
Eric House
5ff6f2ca22 fix TIMEOUT calculation 2017-11-16 08:27:51 -08:00
Eric House
ba9b94a0c6 move g_free after last use of ptr
(Made same on another branch but couldn't cherry-pick)
2017-11-16 08:18:39 -08:00
Eric House
f45dcb36b1 rewrite of shell script in python3
translate the most-used features of my too-big-for-bash script into python3,
which is clearly much better suited. Tried to keep the structure and variable
names intact so that diff has a chance of showing something, but when a class
replaces a bunch of arrays that were being kept in sync there's only so much
you can to. Currently doesn't support stuff like app upgrades and switching
from tcp to udp, but those should be relatively easy to bring over from the
.sh when/if I need them.
2017-11-16 08:15:06 -08:00
Eric House
9d02237f19 add assertion to catch too many players 2017-11-16 08:14:49 -08:00
Eric House
236124319a rewrite of shell script in python3
translate the most-used features of my too-big-for-bash script into python3,
which is clearly much better suited. Tried to keep the structure and variable
names intact so that diff has a chance of showing something, but when a class
replaces a bunch of arrays that were being kept in sync there's only so much
you can to. Currently doesn't support stuff like app upgrades and switching
from tcp to udp, but those should be relatively easy to bring over from the
.sh when/if I need them.
2017-11-16 08:04:18 -08:00
Eric House
8b4042a082 add assertion to catch too many players 2017-11-16 07:59:06 -08:00
Eric House
768b63df24 move free() after last use of ptr 2017-11-15 05:48:45 -08:00
Eric House
033ceab9d1 log outgoing params 2017-11-13 07:26:47 -08:00
Eric House
057728c287 make gtk include an invite ID in rematch invitations
otherwise Android refuses to accept the second "" it receives.
2017-11-11 16:39:09 -08:00
Eric House
cb87a849ab rename dict symlink
It breaks rematch that "dict" is being passed to the Android client from
the linux side, and this is easier than figuring out how and when to
dereference the link.
2017-11-11 16:12:06 -08:00
Eric House
e2c6480992 fix linux client
everything takes one param now, and post sends an array
2017-11-11 12:57:33 -08:00
Eric House
f2c4c82129 a shot at no-conn connecting
Ideally the comms module wouldn't go through its connecting routine in
order to join a game. To that end I added a join() method to relay.py
and code to call it. Joins happen (pairing games, starting new ones,
etc.), but after that communication doesn't. First part of fixing that
would be to make cookieID persistent and transmit it back with the rest
of what join sends (since it's used by all the messages currently sent
in a connected state), but I suspect there's more to be done, and even
that requires a fair number of changes on the relay side. So all that's
wrapped in #ifdef RELAY_VIA_HTTP (and turned off.)
2017-11-10 21:34:02 -08:00
Eric House
ecc247d56d fix a couple of obvious bugs 2017-11-10 20:30:25 -08:00
Eric House
7efcdf0cb8 script for tracking message delivery
The http-based comms flow is stalling. This will help figure out why.
2017-11-04 09:27:33 -07:00
Eric House
1648c9b3e3 tweak to start GTK games and run a long time
I'm trying to fix game-start-time right now....
2017-11-04 09:27:33 -07:00
Eric House
3a2953427a combine adjacent QUERY tasks
Trying to reduce the size of the queue. Eventually the lists of relayIDs
will need to be merged.
2017-11-04 09:27:33 -07:00
Eric House
24171d8317 log more about tasks 2017-11-02 07:16:51 -07:00
Eric House
55f5b500e3 cleanup: method names and logging 2017-11-02 06:19:35 -07:00
Eric House
220918e5cd fix to compile with gdk3.2 (latest Debian) 2017-11-01 05:16:32 -07:00
Eric House
61937ac2d0 use float consistently
timeout of 0 was not making the relay.py script happy
2017-10-31 20:07:12 -07:00
Eric House
a1433e5f3d add kill to relay.py; call from test script using curl
It'll eventually get called from Android and maybe linux, but for now
it's cool to have games disappear from the showinplay display when
they're done.
2017-10-31 20:05:07 -07:00
Eric House
8aeba861cf fix script to move db files again 2017-10-31 06:38:32 -07:00
Eric House
8ee17493ac log length of task lifetime
Need to figure out where the delays are.
2017-10-30 07:12:34 -07:00
Eric House
3d3a986dbd log count of tasks abandoned in queue on shutdown
This confirms that I need to process outgoing messages more quickly,
likely by combining them.
2017-10-29 09:46:51 -07:00
Eric House
1373d0b1db make min-run configurable
With the new http stuff, at least for now, it takes longer to get things
communicated and so killing games after 2 seconds of runtime meant no
moves ever got made. Making it configurable, and passing 10 (seconds)
means nearly all games in a large test run complete reasonably quickly.
2017-10-29 09:26:07 -07:00
Eric House
7b50c90aac pass timeoutSeconds
ACK doesn't need to wait 2 seconds for a reply, and when it does so the
next send waits too. Eventually we'll want to combine messages already
in the queue into a single send. For now, this makes things better.
2017-10-28 20:12:05 -07:00
Eric House
3e9381d946 use a single timer and a queue for received data
using g_add_idle() for each piece of data received on the (background)
curl-query thread wasn't working. They were getting starved, and I think
some were considered duplicates and never scheduled. So add a single
timer proc called every 50 ms and a queue that it checks and into which
the network thread can put stuff.
2017-10-28 16:13:11 -07:00
Eric House
3215affd68 tweaks to test script 2017-10-28 15:31:17 -07:00
Eric House
952272172a always log bytes sent 2017-10-27 05:58:35 -07:00
Eric House
a8f06b53e2 test script; log threadid 2017-10-27 05:57:40 -07:00
Eric House
051b6a7220 change resign-ratio to resign-pct
To match the way other pct stuff works, in part because it seemed it
didn't.
2017-10-25 20:00:55 -07:00
Eric House
14d9063ad0 add --room to error message/hint 2017-10-25 06:43:10 -07:00
Eric House
81df91c4db add commandline option to spec log dir location 2017-10-25 06:34:55 -07:00
Eric House
d05a67ed4b switch to milliseconds 2017-10-25 06:15:46 -07:00
Eric House
c68a067009 add option to not check moves except manually 2017-10-24 19:18:19 -07:00
Eric House
6ff13e6e23 move 'check moves' menu to main window 2017-10-24 19:14:23 -07:00
Eric House
342d229be1 refactor 2017-10-24 07:07:22 -07:00
Eric House
28bec6d456 implement checkForMoves menu again 2017-10-24 06:20:08 -07:00
Eric House
2cfac68f91 leave out entries without relayIDs
SQL is the easiest place to filter
2017-10-23 21:08:14 -07:00
Eric House
c3887b9c77 use a single thread and a protected queue
I don't want race conditions between threads talking to the server.
2017-10-23 21:07:05 -07:00
Eric House
4c15723f90 add http option to test script 2017-10-22 11:43:56 -07:00
Eric House
16ee3e9439 rename and make self-initing 2017-10-22 10:05:36 -07:00
Eric House
523fd26eee make relay hostname configurable 2017-10-22 09:58:01 -07:00
Eric House
f49c81462c wip: received messages dispatched to games 2017-10-22 09:29:15 -07:00
Eric House
43ffb156fc wip: successfully get list of moves 2017-10-22 07:30:14 -07:00
Eric House
47a048d553 fetch relayIDs from db 2017-10-21 16:05:54 -07:00
Eric House
a65af79953 add check for being on main thread 2017-10-21 15:23:46 -07:00
Eric House
ec7fde3b62 add relayID to DB and to table 2017-10-21 14:59:10 -07:00
Eric House
a6602fabe0 hide menuitem when not in http mode 2017-10-21 14:24:38 -07:00
Eric House
37162e0471 fix curses commit; refactor & cleanup 2017-10-21 12:11:26 -07:00
Eric House
816df4336c run post in thread since it takes time 2017-10-20 06:26:46 -07:00
Eric House
3045697d31 wip: process moves received 2017-10-19 21:20:14 -07:00
Eric House
5223ccabe1 add option to run forever 2017-10-19 20:50:33 -07:00
Eric House
4a1e51b54a call query from C
Very rough code that fetches messages and does nothing with them.
2017-10-18 22:03:14 -07:00
Eric House
fbaa1f139e add test method and implement query() endpoint 2017-10-18 21:18:30 -07:00
Eric House
e6e93c09ab oops: use the right length 2017-10-18 07:19:43 -07:00
Eric House
c08be98fda wip: include multiple packets in reponse json 2017-10-18 07:09:05 -07:00
Eric House
b86ffeb2b9 wip: data gets to relay and response handled
A device registers and a game can start. But we don't get to being
able to make a move yet.
2017-10-18 06:53:15 -07:00
Eric House
2dc80ac93f talk to new python script to interface with relay
So far uses curl and json-c to send b64-encoded data to new script
which is able to echo the data. Next that script will need to open a
UDP socket to the relay and return results that appear before timeout.
2017-10-17 21:32:11 -07:00
Eric House
36aef059c1 remove assertion: deviceID can change
Hit this nuking the devices table mid-game. Games recover with the
assertion removed (and storing the new/non-matching deviceID)
2017-10-07 10:47:44 -07:00
Eric House
2cabf2332c fix compiler-found (but trivial) error
debian's new compiler rocks. Effected only test code I never use, but
still nice to fix.
2017-10-07 08:03:18 -07:00
Eric House
618ee89add fix crash drawing game timer
It's outside the normal begin_/end_draw flow and so cairo wasn't set up
as expected.
2017-09-20 07:26:26 -07:00
Eric House
0b0a50bd5c add timestamp to chat messages, db and display
On send, add current seconds to message. Store and display in android
code. Display layout needs work.
2017-06-10 11:36:45 -07:00
Eric House
6e5973c55b toward making tile picking work through rotations
Make face-up tile picker util method return void and add mechanism for
passing in selected tiles asynchronously, as has been done recently with
the rest of the once-blocking util callbacks. Works perfectly in the gtk
case. Likely crashes in curses (if picking face-up option is on.) In
java all the callbacks are there but rather than put up a UI we pretend
the user says "pick 'em for me" each time. Putting up a UI is next.
2017-03-09 20:36:14 -08:00
Eric House
c271202faa make bad phonies alert non-blocking
Continue conversion of alerts that required blocking the JNI thread. Now
board_commitTurn() takes a second boolean indicating whether phonies
found have been approved by user. Common code informs user, and if he
approves client code calls board_commitTurn() again. In case where
turn's lost there's no call to make back, but there's the undesirable
change that if a robot moves next its move will be reported on top of
the turn-lost alert. Ideally new alerts would appear under, not on top
of, those that have not yet been dismissed.
2017-02-20 07:20:19 -08:00
Eric House
42aef7b85c add UI to set phoniesAction creating new gtk games 2017-02-19 15:05:40 -08:00
Eric House
5f12d1a03b assign faces to blanks asynchronously
Next step in converting util_ methods that required blocking: blank tile
assignment. Now post a query and add a method that the client code can
call when the user's decided. Include enough state (col, row, and
playerNum) so that it's probably pretty safe.
2017-02-18 19:16:32 -08:00
Eric House
ca6edcfc9a make trade and move confirm non-blocking
Probably breaks curses build, but for gtk and Android
turn move and trade confirmation into a two-step process, making
board_commitTurn() non-interactive when called with a second
parameter. The old blocking util methods now return void and it's up to
the client code to interact (on the main thread) then re-call
board_commitTurn() if appropriate.
2017-02-17 08:58:20 -08:00
Eric House
1f2f4506c4 remove unused query option. Less to convert. 2017-02-17 06:30:54 -08:00
Eric House
2a0b21e5e8 make password fetching non-blocking
First attempt to stop blocking the jni thread: instead of returning a
password from a util_ method, have it include enough state that the UI
can return, put up a dialog, and then pass that state and the password
back and have them matched up again. I think this will work for the
remaining blocking Alerts too.
2017-02-17 06:23:44 -08:00
Eric House
4d5278704e symlink changed! 2017-02-16 19:05:34 -08:00
Eric House
b96d44393a add and use boolToStr
Just to make log messages a bit more helpful. Should be no behavior
change, and no change in code generated in release builds.
2017-01-22 14:15:29 -08:00