Commit graph

276 commits

Author SHA1 Message Date
Eric House
24e1085b30 clarify old app start percentage option 2024-01-05 12:58:58 -08:00
Eric House
6018392160 send/handle all invitations at once
I'm trying to reproduce with initial invitations the stalls I'm seeing
with rematches (rarely)
2024-01-04 20:28:49 -08:00
Eric House
8388b27002 add comments about problems with signed gameIDs 2024-01-04 18:03:38 -08:00
Eric House
ac71aac787 add tile count to summary 2024-01-04 11:14:30 -08:00
Eric House
c68050e190 add summary 2024-01-04 09:50:24 -08:00
Eric House
6f6714596a add board size tests
These fail in a way that I think is unique to the curses app, so I'm
not fixing them right away.
2024-01-04 09:50:24 -08:00
Eric House
c167183e37 add core detection and board/tray size to test script 2024-01-04 09:50:24 -08:00
Eric House
78cbf7aa7b add upgrading of app mid-script 2024-01-04 09:50:24 -08:00
Eric House
d1061327c7 add ability to use new and old versions of app
TODO: upgrade mid-game
2024-01-04 09:50:24 -08:00
Eric House
713ce151e9 don't print duplicate status line 2024-01-04 09:50:24 -08:00
Eric House
3d8f2886f2 more test scripts tweaks 2024-01-04 09:50:24 -08:00
Eric House
87557ce769 support more devices, and look for stalls 2024-01-04 09:50:24 -08:00
Eric House
f0ca490b3c fix stuff test script found 2024-01-04 09:50:24 -08:00
Eric House
1181e908dc Add option to choose how rematch-game players will be ordered
When rematching, some users have a convention that e.g. lowest scoring
player in the "parent" game goes first. So allow that, providing the
choice on each rematch until a default has been chosen. Support
changing that default in a new prefs setting.

The place I chose to enforce the order was on the host as invitees are
registering and being assigned slots. But by then there's no longer
any connection to the game that was rematched, e.g. to use its
scores. So during the rematched game creation process I create and
store with the new game the necessary ordering information. For the
3-and-4 device case, it was also necessary to tweak the information
about other guests that the host sends guests (added during earlier
work on rematching.)
2024-01-04 09:50:24 -08:00
Eric House
2936869b45 show host as part of each game display 2024-01-04 09:50:24 -08:00
Eric House
434096046b log to file even if --debug not on 2023-12-03 21:09:33 -08:00
Eric House
c31bc3c0eb improve rematch test 2023-12-02 14:45:25 -08:00
Eric House
c726477878 cleanup 2023-11-30 11:03:27 -08:00
Eric House
d021bb4029 add test for rematch (once for now) 2023-11-29 17:11:51 -08:00
Eric House
be9159fc35 add support for tray and board sizes 2023-11-29 11:33:12 -08:00
Eric House
b3123c5a48 add better status printing 2023-11-29 11:12:18 -08:00
Eric House
55e36e10a7 new script to run many games per device
I need it to be much closer to Android....
2023-11-27 21:32:43 -08:00
Eric House
cae91d20cb Preliminary sketch of how cmd callbacks work 2023-08-14 08:11:01 -07:00
Prod User
7f1eec654c fix linux client test to compile and run on Anlinux proot on Android tablet 2023-08-14 08:11:01 -07:00
Eric House
53ce78e1ed initial changes toward a new test script
Android has lots of games on a single device. My current test has one
device per game. I'm hoping to fix that, and am starting with figuring
out how the script and "device" instances will communicate.
2023-08-08 12:09:47 -07:00
Eric House
280fc3bfe1 fix failure to correctly pass devids into linux client 2023-07-18 21:35:17 -07:00
Eric House
073271fe61 tweak test script to better test rematching 2023-03-08 20:48:55 -08:00
Eric House
1083cbd525 improve test script and fix rematching bug it found
Server needs to not rematch if any device has more than one
player (for now, as I'm too lazy to fix this rare condition.) I'm
moving toward having the linux client write status to a unix socket on
exit rather than having the test script parse the log file for
status. GameOver is there now. Tile counts should follow.
2023-03-05 10:23:48 -08:00
Eric House
8f1dfc9817 include rematching in test script
Add new script param setting a timeout before which games will be
rematched on finishing. Add new param to ncurses version telling it to
try to rematch when finishing. This introduces a new problem because
now there are multiple games per "device", and various log-grepping
stuff like listing the number of tiles in play or determing whether
device is finished all assumed one game. I addressed the latter by
adding a way to query the DB to see if all games are done, but that's
not quite right because the number of pending messages is increasing
after a game completes. Still, the testing is useful so I'm pushing
this.
2023-03-04 09:36:42 -08:00
Eric House
30136e22a1 remove relay options from test script 2022-12-26 19:40:57 -08:00
Eric House
3faf4687db don't call a game over until message count drops to 0
I'm looking for a test case to reproduce the Andorid situation where
invitations are never deleted from comms' queue and so prevent the
game from being considered over. Doesn't seem to happen in Linux, but
more tests are good.
2022-12-26 17:15:44 -08:00
Eric House
0663bbab5b fix test script param 2022-10-06 08:45:03 -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
55db35867b add --board-size for testing 2022-03-13 15:02:08 +01:00
Eric House
483a49ad67 fix so mqtt really is the default 2021-12-21 16:34:04 -08:00
Eric House
f49ec19921 make test script default MQTT-only 2021-12-15 10:06:14 -08:00
Eric House
e19f1042cb add option to force number of tiles in tray 2021-07-16 12:15:49 -07:00
Eric House
694953c820 add support for trays with up to 9 tiles 2021-07-16 12:15:46 -07:00
Eric House
9d1214d604 hide dup details when no dupe games present 2021-06-28 12:58:55 -07:00
Eric House
fb0807c14b fix so 0-percent works 2021-03-19 12:50:37 -07:00
Eric House
3f6f16c2f4 add script to print comms msg exchange details 2021-03-19 12:50:32 -07:00
Eric House
2927ded334 default undo pct to 0
Until it's fixed don't need to be have tests always fail for a known
reason
2021-01-18 16:27:16 -08:00
Eric House
e4594f36e0 generate new mqtt devid when server reports dupe
Thanks to my use of unseeded() rand() early on to generate mqtt device
IDs, a handful of devices are using the same devIDs. The server notices
this and passes a new response which triggers generating a new id that
should be unique (rand() being seeded earlier now.) Testing says the
games that are left behind with the old devid will limp along thanks to
their relay connection while newer games will be better.
2020-09-13 15:06:08 -07:00
Eric House
e26fd23df1 add addrType to comms' main addr when added to channel
I'm fixing android client not showing stats for or allowing to disable
mqtt after it's added automatically to a game that connects
otherwise. Problem was that only the channel got the mqtt address
flag. So now add the flag for any type that's added.
2020-09-10 15:11:22 -07:00
Eric House
80b7097eee test script: strip extension when making logs dir 2020-09-10 11:13:30 -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
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
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
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