Commit graph

182 commits

Author SHA1 Message Date
Eric House
1ae714d834 start to remove obsolete XWFEATURE_STANDALONE_ONLY 2024-01-09 18:17:36 -08:00
Eric House
f2c1f21da2 refactor 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
3dcac063b5 show quashed state in net state icon (DEBUG only) 2023-11-06 13:11:34 -08:00
Eric House
6ec0e64657 toward changing APIs to allow combined messages for mqtt 2023-03-25 10:24:39 -07:00
Eric House
d924776a84 make invitation to three-device games work on gtk/linux 2023-02-08 10:28:00 -08:00
Eric House
cea0b9659d remove unused files 2023-02-04 07:33:36 -08:00
Eric House
4a57b76817 cleanup: pass xwe with closeProc rather than to destroy
It's only needed when there's a close proc, and that's rare.
2023-02-03 22:00:47 -08:00
Eric House
fcff8dab35 send from inside comms_invite on Linux but not Android
This is probably a temporary fix for Linux not being aggressive enough
about calling comms_resendAll() when opening a game. For now, though,
test scripts fail without it.
2023-01-30 12:02:46 -08:00
Eric House
a02ea95600 remove dead code: game_reset and friends 2023-01-11 12:28:09 -08:00
Eric House
9b1fe83b61 fix to compile without DEBUG set 2022-12-21 10:29:48 -08:00
Eric House
1e447e9d60 move TransportProcs into cGlobals to fix gtk crash 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
8a64d53f61 cleanup 2022-11-18 11:09:22 -08:00
Eric House
b9c6551e8b merge android_branch changes to comms_make
Not tested at all on android
2022-11-18 11:09:22 -08:00
Eric House
61faf1a730 support comparing SMS addresses too 2022-11-18 11:09:22 -08:00
Eric House
b4e197f8af snapshot: mqtt invites for gtk work via comms
Merge that won't compile, but I want it to start fromp
2022-11-18 11:09:22 -08:00
Eric House
e55212df9f improve new game creation
There was some confusion around host and self addresses, where they're
created, default values, removing conTypes from defaults that are not
in received host addr, etc. I left in some asserts to help understand
if code that seems wrong but hard to fix is still getting called.
2022-09-14 21:37:44 -07: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
4ba1b2418c cleanup: remove some relay stuff 2022-08-25 11:20:26 -07: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
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
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
df1606c8fb use ifdef to remove relay-only params 2022-05-15 12:10:37 -07:00
Eric House
0eaa71fce6 remove relay from linux client via conditional compile 2022-05-10 20:54:25 -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
0e1f10b802 fix assertion by adding missing methods
They're stubbed out; hope they're unused. :-)
2022-03-10 13:06:03 -08: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
5f1f37a7a2 fix gtk bug not terminating buffer 2021-08-24 21:24:55 -07:00
Eric House
afc3ff156e make game ask for dicts when needed
It's awkward for platform code to create a dictionary prior to opening a
game whose data contains the information about what dict to open. So add
a dutil method to fetch a dict, and call it from inside game opening
code. Makes linux code better at least.
2021-03-19 14:27:04 -07: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
7fd82b4831 fix to compile on raspberry pi (64-bit ARM) 2020-12-15 10:02:51 -08:00
Eric House
aa5bacdd5f save and restore board windows' positions 2020-12-02 14:29:07 -08:00
Eric House
377bb36c73 cleanup 2020-10-01 13:38:07 -07:00
Eric House
d17ac7ea0b rename gamesdb public functions (linux only) 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
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
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
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
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
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