WebSocketServer.CardServer.CheckVoteCount C# (CSharp) Method

CheckVoteCount() private method

Checks if everyone who is logged in, and is playing, has voted. If so, after a 1s delay, the cards are flipped.
private CheckVoteCount ( ) : void
return void
        private void CheckVoteCount()
        {
            // If every logged in non-spectator has voted, auto-flip the cards.
            if (ActiveRound != null && Clients.Where(cl => ActiveRound.Votes.Where(v => v.ClientID == cl.Info.ID).Any()).Count() == Clients.Where(c => !c.Info.IsSpectator).Count())
            {
                // Tell each client to lock its Undo button.
                Clients.ForEach(c => c.SendMessage("LockUndo"));

                // Wait a few moments, then flip the cards.
                new Thread(() => { Thread.Sleep(1000); ActiveRound.FlipCards(); BroadcastGameState(); }).Start();
            }
        }