Exemplo n.º 1
0
        private void NewGameBtn_Click(object sender, EventArgs e)
        {
            string playerName = UserNameInput.Text;

            if (!IsPlayerNameValid(playerName))
            {
                UserNameInput.Text = "Enter your name";
                return;
            }

            networking.CreateSession(playerName);
            SessionCodeInput.Text = networking.sessionName;

            RunGame();
        }