I have created a multiplayer game. The game goes like this :
- A player creates a challenge
- Any eligible player joins the challenge
- When 10 players are joined, the game starts.
- Each player has a predefined number of moves which the count kept on client side. When player finishes her moves (the player will send score to the leaderboard.
- When 10 players have sent their scores, challenge will finish and leaderboard will be shown to all 10 players only.
- Players will not wait for each others to play. A player will play and send his/her score and the game is finished for them.
Where I got stuck at is How will I know every player has sent their scores? How will I decide a challenge is finished and display leaderboard accordingly?