how to do that when the other player's turn, the timer is count again 30 sec?
Two booleans, one for each player, which states whose turn it is.
When the turn changes (its boolean turns off), the timer is reset to 30.
Develop games in your browser. Powerful, performant & highly capable.
maybe you have example?
I tried to do 2 booleans but the timer not stopped