Beispiel #1
0
        public void NextPlayer()
        {
            if (game.player1.Bust == true && game.player2.Bust != true && game.player3.Bust != true)
            {
                btnHit1.Enabled  = false;
                btnStop1.Enabled = false;
                btnHit2.Enabled  = true;
                btnStop2.Enabled = true;
            }
            else if (game.player1.Bust == true && game.player2.Bust == true && game.player3.Bust != true)
            {
                btnHit2.Enabled  = false;
                btnStop2.Enabled = false;
                btnHit3.Enabled  = true;
                btnStop3.Enabled = true;
            }
            else if (game.player1.Bust == true && game.player2.Bust == true && game.player3.Bust == true)
            {
                btnHit1.Enabled  = false;
                btnHit2.Enabled  = false;
                btnHit3.Enabled  = false;
                btnStop1.Enabled = false;
                btnStop2.Enabled = false;
                btnStop3.Enabled = false;

                game.GameEnd(database, currentUser);



                Form1 form1 = new Form1(currentUser);
                form1.Show();
                this.Close();
            }
        }