Пример #1
0
        /// <summary>
        /// Resets the game
        /// </summary>
        private void ResetLayout()
        {
            WriteToFile(log_file_path, START_GAME_STRING + DateTime.Now.ToString());

            // reset the dealer
            dealer.ObtainCards();
            // clear the trump card image
            pbTrumpCard.Image = null;
            // reset the cards remaining label
            lblCardsRemaining.Text = dealer.NumberOfCards.ToString();

            // reset the PlayerHandControls
            phcPlayer.ResetHand();
            phcComputer.ResetHand();

            // removes any cards from the panels
            pnlAttackCards.Controls.Clear();
            pnlDefendCards.Controls.Clear();

            cpbDeck.Visible = true;                 // makes the deck visible
            noCardsRemainingNotification = false;   // the notification has not been sent
            playerAttacking = true;                 // the player is attacking first
        }