Commit graph

1548 commits

Author SHA1 Message Date
Eric House
561c5c9eb1 cleanup 2021-03-22 10:43:34 -07:00
Eric House
d5546b484d cleanup (mostly non-DBG compile errors) 2021-03-19 13:03:39 -07:00
Eric House
3f6f16c2f4 add script to print comms msg exchange details 2021-03-19 12:50:32 -07:00
Eric House
f335ea7ad9 remove or tweak logging 2021-03-19 12:50:28 -07:00
Eric House
5fa44e54fa remove unneeded .h file 2021-03-19 12:50:23 -07:00
Eric House
f9e1deabfc don't include dict tiles/values in initial server msg
There's code on all platforms to force user to have dict prior to
opening a game or responding to an invitation. "Empty" dict play hasn't
made sense in a long time.
2021-03-19 12:50:19 -07:00
Eric House
ca88d9c0bf backout ack change for now 2021-03-12 07:16:28 -08:00
Eric House
f947382f4c in comms, send ack on receipt of duplicate msg 2021-03-11 21:43:26 -08:00
Eric House
6c50fcb818 cleanup; make original tiles-values choice the default
We've decided that on upgrade users shouldn't be surprised by a busy
board and unaware of how to fix it. So keep it the way it's been and let
the curious discover the new ability. Also, simplify code.
2021-02-17 15:47:55 -08:00
Eric House
be0a6f83f3 drive letters/values from a three-value enum
There are three choices now. The button pops up a menu on android and
moves through the choices on linux.
2021-02-11 14:11:02 -08:00
Eric House
64f1d83b5d show-values mode now means show along with face
not instead of. It now feels as if it should be a global setting, not a
per-game thing to toggle. We'll see what folks think.
2021-02-10 20:43:11 -08:00
Eric House
d3cf74920e remove unused method 2021-02-10 19:37:19 -08:00
Eric House
0ea9b42db8 clear high-bit when generating gameIDs
postgres DB, at least on ARM, doesn't like it.
2021-01-25 07:58:49 -08:00
Eric House
ceec6e7468 fix crash verifying first tray can yield a move
Had never needed an engine for a remote player before. So create one on
demand and nuke after use.
2021-01-18 16:55:20 -08:00
Eric House
d41d5c700f don't let first player have unplayable rack 2021-01-09 20:39:33 -08:00
Eric House
64a470185c display known player timestamp when known (debug only)
For some reason it's getting cleared sometimes. Will fix.
2021-01-04 08:12:05 -08:00
Eric House
35bdd2282e limit pattern parse by max length of tiles 2020-12-27 11:53:36 -08:00
Eric House
d0f5d9949a handle two-letter tiles better
Choose the two-letter tile where possible. Not sure though if this is
always the right move.
2020-12-26 20:45:34 -08:00
Eric House
45bc623975 enable RAISETILE feature for linux and android
It's timer-based. Not sure I like that, but let's see how it feels
on-device.
2020-12-02 17:55:49 -08:00
Eric House
3760d735bc fix compile when XWFEATURE_RAISETILE defined
Doesn't seem to work, and that's not addressed by this.
2020-12-02 17:21:47 -08:00
Eric House
31eeb1de43 when dragging, move crosshairs even over tile
Change so you still see dragging happening via crosshairs movement, but
the dragged tile itself doesn't move except over a place it can be
dropped.
2020-12-02 08:41:52 -08:00
Eric House
99a7930dfb add loop to print a bunch of devids (disabled) 2020-11-29 11:43:19 -08:00
Eric House
623f3ad145 inform when client's game complete too
Board needs to know when to dismiss the waiting-for-host alert. A
similiar need host-side was handled from common/; do same for client
side.
2020-11-28 17:57:33 -08:00
Eric House
00588f50f3 show an cannot-play-yet alert on guest side too 2020-11-28 13:55:36 -08:00
Eric House
f3bb0c99a9 invite alert changes
Create new class that owns the alert. Let it decide whether to post,
remove, etc. Seems to work, but I've removed some of the "reinvite"
options I'm not sure were helpful anyway. To be considered...
2020-11-20 18:07:19 -08:00
Eric House
5d4fd0e58b don't dispose gi before game
gathering players was failing because disposed gi was pointing at
garbage. I'm lucky it didn't segfault.
2020-10-23 19:03:26 -07:00
Eric House
af37fb45f7 Rewrite BT comms to not use a Service
It's simpler this way, and I'm tired of stuff not happening because the
OS chooses not to schedule e.g. an invitation send for minutes. Goal's
to be running BluetoothServerSocket.accept() as much as possible when
there are active BT games in play OR when the game's in the foreground.
If that's happening, sent invitations and moves will be received when
users expect. When there's no traffic and app isn't being brought to
foreground, backoff will ensure I don't try to run accept() too often.

FWIW, BTLE seems to offer a better way to do this (to have an app be
responsive to incoming invitations when it hasn't run in the foreground
in a while), but it requires users to accept FINE_LOCATION
permission. I'm hoping I can make this work to avoid asking for that
permission.
2020-10-21 21:10:09 -07:00
Eric House
9f1f1aeee7 only harvest when closing game 2020-10-01 13:39:02 -07:00
Eric House
21483cf861 add missing file 2020-09-30 20:38:44 -07:00
Eric House
f90d76329b use semaphore to protect known players data
Requires adding a common method called by platform code on creating a
new dutil ctxt.
2020-09-30 17:21:18 -07:00
Eric House
dbde9c87ae list known player in invite info where known
(for mqtt only)
2020-09-30 10:10:43 -07:00
Eric House
2b56b1f8b2 cleanup 2020-09-29 16:06:59 -07:00
Eric House
eb728e4368 fix crash: don't go beyond last edge
An obscure pattern from a user caught this one, but the test should have
been there all along.
2020-09-28 19:18:09 -07:00
Eric House
e9ec30206d add debug-only field tracking place in iterator 2020-09-28 19:18:04 -07:00
Eric House
7b097ea67d Don't allow duplicates when renaming 2020-09-28 11:17:51 -07:00
Eric House
8406d9e551 implement Known Player renaming
Used existing GameNamer which now needs to be made more general.
2020-09-28 08:59:39 -07:00
Eric House
aff75053ac implement deleting known players 2020-09-27 20:52:56 -07:00
Eric House
9e78e47954 fix so non-drag movement stops timer to show words
The last change meant the test whether to show the words under the
pen-down cell would pass when it shouldn't because a drag to an occupied
location didn't register as movement. Change so movement counts to stop
the timer even if it wouldn't change the drag-target's location.
2020-09-27 17:32:23 -07:00
Eric House
80160d740f null-terminate words buffer 2020-09-27 14:23:39 -07:00
Eric House
7fe249ad8d Don't allow drag of tile to place it can't be
Rather than have a tile revert to its original location if it's dropped
where it can't be (on an occupied tile or outside the board), put it in
the last place it could have been. Do that by only updating cur when
it's to a legal location, and then relocating to cur when drag ends.
2020-09-27 13:44:21 -07:00
Eric House
b0c1c5ac1b don't deref ptr after free(); cleanup 2020-09-26 11:00:11 -07:00
Eric House
fad252d8c0 use created stamp to decide between conflicting addresses
Not at all tested, but now the game's timestamp is kept and passed in to
where it can be used to determine, e.g., which of two Bluetooth device
names to keep for a given opponent.
2020-09-26 09:48:35 -07:00
Eric House
c4b55385a3 add creation timestamp to game struct
Address resolution will want to know which address is older. Game
creation is a good enough proxy for that, so add it in a cross-platform
way.
2020-09-26 09:48:35 -07:00
Eric House
f0f2a598e0 make up new name rather than drop new player 2020-09-26 09:48:35 -07:00
Eric House
49909c84d6 make known-player stuff conditional
and ifdefs to C and BuildConfig flag to java so the feature can be
hidden in release builds until it's ready.
2020-09-26 09:48:35 -07:00
Eric House
fc05612b74 rough implementation of creating and inviting a known player
Followed the way rematch works. Which is gross. Eventually the two
paths (invitee and rematch) should be unified with rematch getting a lot
simpler.)
2020-09-26 09:48:35 -07:00
Eric House
11266ece5b gtk known-player invitation works 2020-09-26 09:48:35 -07:00
Eric House
736c9f3503 harvest players on open; save and make available
Got as far as having gtk client display list of previously harvested
known players to be invited. Their addresses, or at least mqtt ids are
saved. Next is to actually invite one.
2020-09-26 09:48:35 -07:00
Eric House
43c1e13563 remove dead code 2020-09-23 12:01:17 -07:00
Eric House
8072a0c629 write 0 where flags will be
unused for now.
2020-09-22 10:56:06 -07:00