im new to networking and currently im making a multiplayer game via java socket. so i want to ask a simple question. the game will be like this :
- the game needs 3 player to start
the tile is 3x3
if all the player already join the server the game will be started
- each player will be given a turn to clicking the button that contain image , example : player a clicking button 1 , and then the turn will be given to player b , player b clicking button 2 and then the turn will be given to player c , etc
MY QUESTION IS :
how do i give a timer for each player turn? what i want is if the player doesnt clicking/idle for a period time the turn will be throw to the next player. am i need to manage it in my server or client? and how?
how to handle a player that disconnected? if the player disconnect i want the turn will automatically given to the next player.