Exemplo n.º 1
0
        void RestartGame()
        {
            //Disable buttons
            HideUserItems();

            try
            {
                deck.Dispose();
                dealer.Dispose();
                customer.Dispose();
            }
            catch (Exception)
            {
                Console.WriteLine("Objects cannot disposed!\n");
            }

            pnlCardsDealer.Controls.Clear();
            pnlCardsPlayer.Controls.Clear();

            StartGame();
        }