When I play vs my partner online via the server, there is a button we each can press that, as an unwanted side effect, corrupts our personal decks in our opponent’s view 100% of the time. For example, in her player window, she presses her “end of round cleanup” button. Everything is normal for her, but for me, her player deck suddenly flips face up and loses cards. And her view of my deck is corrupted if I press my button. When I re-synched with her while she had my player window open, MY deck got corrupted too (matching her view of it), so I had to play the rest of the game with a face-up deck, and all cards I drew from it were now face up instead of face down as they should have been.
My strong suspicion is that the “reverse” deck command is not being mirrored correctly for other players.
More info. (I created the module.) At the end of each round, you are supposed to shuffle your discards and place them under your deck, so your deck is now the original cards (unshuffled) with the shuffled discards at the bottom. To implement this, I created an end-of-round button and did the following: shuffle discards, reverse the order of the main deck, send the discards to the top of the main deck, reverse the deck again. Doing it this way isolates all code to one place; it’s all deck commands. (The button also sends workers home, but I don’t think that relates to my problem.)
(It’s hard to test online play with an impatient partner. Is there a way for me to test a live game with only one computer?)
After our game ended, I decided to change how I implemented the “end of round cleanup” button. In the new version, I shuffled the discards and sent them via a GKC (return to deck and “down”) to the main deck. I avoided deck commands except for shuffle. When we played again, the synchronization-loss issue vanished. This is why I think there is a synchronization problem with certain deck commands, most likely reversing a deck.