Move game logic to room server, and use JSON library.