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.
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.
There must be some race condition. Better than crashing is to fail to
dispose a game's memory, which hopefully will be the effect here. I
don't understand how this happens to can't test.
The two weeks is configurable. But the idea is somebody creates a game
with a random name but it's never joined. Eventually the name is used
again and the first to connect joins the existing game that will never
progress. I could just prune from the DB, but this is less work ongoing.
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.
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.
Crash due to typo introduced by Weblate made me realize I wasn't running
the script that ensures translated strings have the same set of format
specifiers as the English -- which might not be strictly necessary, but
it's safer to enforce it for now. Moved a few remaining %s to %1$s style
while at it.
There was only one size of png for the net status arrows. Now there are
svgs that generate the whole range. Also set color programatically to
avoid having to maintain four.