コード例 #1
0
        private void onLoad()
        {
            gameGrid.Children.Clear();
            Game.GetDealer().ResetCards();
            Game.GetPlayer().ResetCards();

            //DealerPart
            _dealerCards             = new DealerCards(Game.GetDealer());
            _dealerCards.StartDealer = new DealerCards.StartDealerDelegate(NewGame);
            Grid.SetRow(_dealerCards, 0);
            Grid.SetColumn(_dealerCards, 0);

            gameGrid.Children.Add(_dealerCards);

            //PlayerPart

            _playerCards            = new PlayerCards(Game.GetPlayer());
            _playerCards.HitPlayer  = new PlayerCards.HitPlayerDelegate(Game.GetDeck().GetCard);
            _playerCards.StayPlayer = new PlayerCards.StayPlayerDelegate(PlayerStayed);

            Grid.SetRow(_playerCards, 1);
            Grid.SetColumn(_playerCards, 0);
            gameGrid.Children.Add(_playerCards);
        }