How to realize the waiting effect of round-based games by websocket

I"m going to use Socket.IO to implement a game similar to hearthstone.

however, as I am used to RESTFUL API design, I don"t understand how to use Socket.IO to control or verify whether a player has reached his trading round.

I hope experienced people can guide me on how to design round , round , time control and so on

from the point of view of code logic.

socketio still want to think? It would be nice for the server to send a message when it comes to playing cards.


I now use a global static array to calculate the playing time, which makes me feel mentally retarded

.
Menu