Auto-translated
I think it would be helpful to end the game when a disconnection occurs (display a message indicating that the opponent has left and offer to save or return to the main menu) after the player has completed their turn in case of a disconnection or the opponent leaving the game.
Since data is transferred from one player to another after the active player has completed their turn, in such a case, when attacking the opponent, it would be possible to implement an analogue of saving the battle.gm2 file and then disconnecting the game.
This would save both players' time and reduce problems with restoring an interrupted turn.
It's not critical, but it would be convenient.