Commit graph

328 commits

Author SHA1 Message Date
Eric House
4caf660c1c cleanup 2023-01-04 14:13:53 -08:00
Eric House
16ced1dd49 fix linux compile; log gameID as %X everywhere 2022-12-30 16:15:03 -08:00
Eric House
53e1a68d6d track, and offer to display, comms-sent invites like others
I'm only keeping the most recent since they're sent every time a game
opens, app launches, etc.
2022-12-10 22:17:14 -08:00
Eric House
a2806f1c3f show known player name of missing host
This is for debugging use only for now, but it's useful when a host
seems non-responsive to know which it is.
2022-12-05 21:21:46 -08:00
Eric House
f2b034d710 recognize in-comms invites when opening incomplete game
Android offers to invite when it thinks no invitations have been
sent. Now it knows about those buried in comms.
2022-11-18 11:09:22 -08:00
Eric House
6f57665da2 pass number of pending comms invites into informMissing() 2022-11-18 11:09:22 -08:00
Eric House
9a7946de36 fix stall showing up in curses test app
Duplicate messages early on, which happened only in the test script
but could have anywhere, broke connectivity. So don't kill address
records when a duplicate shows up. Dupes only escape message ID
checking early (before channel is established). I used to remove
address records when a message was rejected, but don't understand why
so removed that, though asserts show it's not mattering except for
those early messages.
2022-11-18 11:09:22 -08:00
Eric House
7587653541 fix memory leaks; get curses using new invite resp. code 2022-11-18 11:09:22 -08:00
Eric House
766554d3f5 snapshot: rematch and invitation handling most work from common
But curses will crash, duplicates and missing dicts aren't handled,
etc.
2022-11-18 11:09:22 -08:00
Eric House
381b014b8b change name for clarity 2022-09-06 11:40:09 -07:00
Eric House
4996d3fe89 improve comms address tracking (breaks android for now)
Remove legacy relay-inspired logic around comms addressing. Now when a
device creates a game it's required to provide its "self address," and
if it's a client, the address of the host (which it presumably got
through the invitation in response to which the game is being
created.) Then as registration messages come in from clients, the host
gathers their addresses as always.
2022-09-06 11:40:09 -07:00
Eric House
1b9fd67e9f logging cleanup 2022-08-20 10:24:29 -07:00
Eric House
cd9ea8ce3f oops: don't revert the bug-fix change to server.c 2022-08-10 12:13:50 -07:00
Eric House
cb362618e9 revert move-reporting changes
They need more testing before the next release, and are fine except
for duplicate-mode play.
2022-08-10 13:33:18 -05:00
Eric House
0497a456e7 cleanup 2022-08-09 22:39:41 -05:00
Eric House
c00bbf8ef1 simplify move expl tracking; don't show for dup-mode robots
Removed a boolean that seemed unnecessary. Stopped showing
move-explanations for robots in duplicate mode. They were being shown
too early thanks to bad logic, but I don't think there's any call for
them at all. A robot's move is only interesting if it's the one that
wins the turn.
2022-08-04 16:03:07 -07:00
Eric House
818868bdb2 remove undo as an option for duplicate mode games 2022-08-03 19:54:53 -07:00
Eric House
e6d516ca1d remove assertion firing in dup mode
The assertion's clearly blocking testing, but I'm not sure it's not an
error for two move explanations to want to co-exist. For now they're
concatenated.
2022-08-01 13:05:19 -07:00
Eric House
10a2c5e4b7 fix assertion failure in dupe mode 2022-07-30 19:50:09 -07:00
Eric House
882c717add cleanup/fix compiler warning 2022-07-07 10:00:24 -07:00
Eric House
ba132bb23d Replace LangCode with ISOCode, linux and common side
This will break the Android build, but it's the order in which I
work...
2022-06-05 09:07:01 -07:00
Eric House
da23bfe23b add debug pref to not add mqtt to all games
I want it for testing that stuff like NBS (data SMS) works for more
than connecting. MQTT works so well nothing ever gets used once it's
there.
2022-05-09 15:10:15 -07:00
Eric House
372d722b58 make number of tiles proportional to board size
Until there's a way to specify specifically for each size, adjusting
from the built-in 15x15 tileset works reasonably well.
2022-04-01 07:51:13 +02:00
Eric House
2d6ce6cfda fix problems with tile picking introduced by 9-tiles
Not sure if these would show up if you're not picking face-up,
but if so they justify a release.
2022-01-20 22:14:13 -08:00
Eric House
5e028281de fix mis-reporting number of tiles traded 2022-01-17 16:31:19 -08:00
Eric House
694953c820 add support for trays with up to 9 tiles 2021-07-16 12:15:46 -07:00
Eric House
8f83a390f1 a bit o' cleanup 2021-06-30 11:47:26 -07:00
Eric House
64ff2e5f69 Merge branch 'android_branch' into wasm 2021-03-27 10:27:14 -07:00
Eric House
561c5c9eb1 cleanup 2021-03-22 10:43:34 -07:00
Eric House
e86626d7be don't crash if remote doesn't support chat 2021-03-19 14:30:17 -07:00
Eric House
b0cc6dd744 clear name on delete; remove logging 2021-03-19 14:29:48 -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
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
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
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
5998132d4b fix standalone hang introduced by 15f95b52a 2020-08-27 19:47:10 -07:00
Eric House
15f95b52a9 hack to recover from stalled by-room-name games 2020-08-26 13:04:02 -07:00
Eric House
b0f7176b6c fix relay game failure to change roles
If a configured-as-host game joined an existing game the relay would
make it a guest. The android util_ callback for that change was only
implemented in BoardDelegate and so the change was dropped unless the
game was open/visible. Because comms recorded the change, though, the
callback would never be called again and so the game never learned to
behave as a guest and never registered: permanent failure to join game!
Implemented with a new server state so initClientConnection can be
called from server_do() instead of inside comms while processing an
incoming packet.
2020-08-25 14:53:33 -07:00
Eric House
15fde8044f make server_initClientConnection() make its own stream 2020-08-25 14:53:28 -07:00
Eric House
d10d2597d4 add logging; cleanup
I'm chasing a relay problem that's hard to repro and need more info when
it's happened. (These won't show up in shipping builds.)
2020-08-24 17:02:49 -07:00
Eric House
a7acc37395 adding logging 2020-08-24 12:10:25 -07:00
Eric House
0f61a6d9f4 pass and use mqttid in game-connection code
To avoid inviteless relay games not having an mqtt channel (and so
yielding a crappy experience) pass the mqtt devid when device registers
and when server replies with all-here.
2020-08-23 08:34:12 -07:00
Eric House
bd53824d95 replace assert fail with message rejection
Some relay bug (I think) misroutes or duplicates packets. Don't assert
as that means test scripts fail to finish. Instead drop the
message. Scripts seem to recover ok with this change and I've never seen
the assert on a device so suspect it's test-world only
2020-08-23 08:22:21 -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
5eef348a6c remove mistaken code (replacing with assert for now) 2020-04-29 12:31:31 -07:00
Eric House
88335d38f2 stop using thread->env mapping for util callbacks 2020-04-26 13:39:21 -07:00