Okay, here are some thoughts on how to play across TinyWebDB:
- I am assuming TinyWebDB is really dumb, and can't store complex data structures like dictionaries. That simplification avoids all sorts of overwriting and locking problems.
- Instead, I propose a fine grained update where every piece of data gets its own tag.
Those tags would be built up using the text JOIN block, separating parts with '/'. (This works even better in FireBase and CloudDB)
- For the front of the tag, pick something no one else uses, like 'NikolaAndABGRPSV1/'
- For the second part of the tag, take one of two possible values:
- The literal word 'ROUND/" JOINed with the current minute, assuming one round per minute: '202203311613/' military time yyyyMMddhhMM format. I assume all players are in the same time zone for this, though there are ways to get UTC for this.
- The literal word 'PLAYERS', in which case the value would be the list of player names in this round
- For the third part of the tag, use a player name from the PLAYER list, with a value the player's move for this round.
Sample tags:values ...
NikolaAndABGRPSV1/PLAYERS : ["ABG", "Nikola"]
NikolaAndABGRPSV1/ROUND/202203311613/ABG : rock
NikolaAndABGRPSV1/ROUND/202203311613/Nikola : paper
NikolaAndABGRPSV1/ROUND/202203311614/ABG : rock
NikolaAndABGRPSV1/ROUND/202203311615/Nikola : paper
In these samples, the first round had 2 players, and it can be inferred which one won.
That was followed by two fragmentary rounds, where the two players missed each other.
This should be supplemented by some extra housekeeping, to allow cleanup after the fact, though I doubt the MIT test server lacks any self cleaning facilities.
Given constant polling of the current PLAYERS list to tell you who else is playing this round, your app would know which tags to read to tell you who played what for this current round.
After the round is over (that minute has passed), you should be able to summarize the round.