Esempio n. 1
0
        private void CheckIfRoundEnd()
        {
            if (gameManager.GameEnd == true)
            {
                string message = "game_end;";
                message += gameManager.GetWinner().ToString() + ";";
                byte[] messageByte = Encoding.ASCII.GetBytes(message);

                foreach (NetworkStream ns in networkStreams)
                {
                    SendMessage(messageByte, ns);
                }

                return;
            }

            if (gameManager.RoundEnd == true)
            {
                SendPlayerCards();
                gameManager.RoundEnd = false;
            }
        }