in the last three metamachy games I played my opponents resigned but I
still lost
arx-cvgameroom-2020-316-876
arx-cvgameroom-2020-147-879
arx-cvgameroom-2020-123-942
I will look into this more tomorrow. Looking at the first one tonight, I noticed that the $players string in your log has the players listed in the opposite order from what I expected it would be. It should list White first and Black second, but it says "catugo arx" even though you are White. Since I was relying on the value of $players to know who was White and who was Black, this incorrect value could mess things up. I will do tests tomorrow to determine why this value would be the reverse of what it should be.
I will look into this more tomorrow. Looking at the first one tonight, I noticed that the $players string in your log has the players listed in the opposite order from what I expected it would be. It should list White first and Black second, but it says "catugo arx" even though you are White. Since I was relying on the value of $players to know who was White and who was Black, this incorrect value could mess things up. I will do tests tomorrow to determine why this value would be the reverse of what it should be.