That is a standard rule in chess. If your opponent has no legal moves (i.e. no way to move without moving his king into check) and is not currently in check, it is considered stalemate, which is a draw.
Have never tried it personally, but this talk made me think collaborative editing is a solved or close-to-solved problem in Emacs: https://emacsconf.org/2023/talks/collab/