当前位置: 首页>>代码示例>>C#>>正文


C# Player.DealCard方法代码示例

本文整理汇总了C#中BlackJack.model.Player.DealCard方法的典型用法代码示例。如果您正苦于以下问题:C# Player.DealCard方法的具体用法?C# Player.DealCard怎么用?C# Player.DealCard使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BlackJack.model.Player的用法示例。


在下文中一共展示了Player.DealCard方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DealCard

 public void DealCard(Player a_toGetCard, bool a_showCard)
 {
     var c = m_deck.GetCard();
     c.Show(a_showCard);
     a_toGetCard.DealCard(c);
     Notify();
 }
开发者ID:ad222kr,项目名称:1dv607,代码行数:7,代码来源:Dealer.cs

示例2: DealCard

 public void DealCard(Player a_player, bool a_show)
 {
     Card c;
     c = m_deck.GetCard();
     c.Show(a_show);
     a_player.DealCard(c);
 }
开发者ID:kk222hk,项目名称:1dv607-kk222hk-Portfolio,代码行数:7,代码来源:Dealer.cs

示例3: Deal

 public void Deal(Player a_player, bool show = true)
 {
     Card c;
     c = m_deck.GetCard();
     c.Show(show);
     a_player.DealCard(c);
 }
开发者ID:fh222dt,项目名称:OOAD,代码行数:7,代码来源:Dealer.cs

示例4: NewCard

 public void NewCard(Player a_player, bool show)
 {
     Card c = m_deck.GetCard();
     c.Show(show);
     a_player.DealCard(c);
     UpdateObservers();
 }
开发者ID:dv222bk,项目名称:blackjack_csharp,代码行数:7,代码来源:Dealer.cs

示例5: DealCard

 public void DealCard(bool show, Player a_player)
 {
     Card c;
     c = m_deck.GetCard();
     c.Show(show);
     a_player.DealCard(c);
 }
开发者ID:rn222cx,项目名称:1dv607-OOP,代码行数:7,代码来源:Dealer.cs

示例6: HitPlayer

 public void HitPlayer(Player a_player)
 {
     if (m_deck != null && a_player.GetScoreOfHand() < 21)
     {
         Card c = m_deck.GetCard();
         c.Show();
         a_player.DealCard(c);
     }
 }
开发者ID:tobias-dv-lnu,项目名称:1dv607_2015,代码行数:9,代码来源:Dealer.cs

示例7: GetNewCard

 public void GetNewCard(Player a_player, bool a_showCard = true)
 {
     foreach (IBlackJackObserver a_observer in m_observers)
     {
         a_observer.AddCardDelay();
     }
     Card c = m_deck.GetCard();
     c.Show(a_showCard);
     a_player.DealCard(c);
 }
开发者ID:dt222cc,项目名称:1dv607-dt222cc,代码行数:10,代码来源:Dealer.cs

示例8: GetCard

 public void GetCard(Player player, bool showCard = true)
 {
     Card c = m_deck.GetCard();
     c.Show(showCard);
     player.DealCard(c);
     foreach(BlackJackObserver observer in m_BlackJackObserver)
     {
         observer.CardDisplayed();
     }
 }
开发者ID:ss223ck,项目名称:OO_Worksshop_3,代码行数:10,代码来源:Dealer.cs

示例9: Hit

        public bool Hit(Player a_player)
        {
            if (m_deck != null && a_player.CalcScore() < m_winRule.GetMaxScore && !IsGameOver())
            {
                a_player.DealCard(true, m_deck.GetCard());

                return true;
            }
            return false;
        }
开发者ID:Holmewi,项目名称:1dv607-jh222qr-workshops,代码行数:10,代码来源:Dealer.cs

示例10: NewCard

 public void NewCard(Player a_player, bool a_showCard)
 {
     foreach (IGameObserver a_observer in m_observer)
     {
         a_observer.CardDelay();
     }
     Card c = m_deck.GetCard();
     c.Show(a_showCard);
     a_player.DealCard(c);
 }
开发者ID:la222tc,项目名称:blackjack_csharp,代码行数:10,代码来源:Dealer.cs

示例11: Deal

 public void Deal(Player player, bool show)
 {
     Card c = m_deck.GetCard();
     c.Show(show);
     player.DealCard(c);
     foreach (CardDealtListener l in m_subscribers)
     {
         l.CardDealt(c);
     }
 }
开发者ID:DevRobDev,项目名称:1DV407,代码行数:10,代码来源:Dealer.cs

示例12: getShowDealCard

 public void getShowDealCard(Player a_player, Boolean show)
 {
     Card c = m_deck.GetCard();
     c.Show(show);
     a_player.DealCard(c);
     foreach (BlackJackObserver o in m_observers)
     {
         o.CardDealt();
     }
 }
开发者ID:jt222ic,项目名称:1DV607-Workshops,代码行数:10,代码来源:Dealer.cs

示例13: DealPlayerCard

 public void DealPlayerCard(bool hiddenCard, Player player)
 {
     Card c = m_deck.GetCard();
     c.Show(hiddenCard);
     player.DealCard(c);
     foreach (IGameobserver o in m_observer)
     {
         o.Playerhasacard();
     }
 }
开发者ID:MartinArvidsson,项目名称:UML,代码行数:10,代码来源:Dealer.cs

示例14: DealCardHandler

        public void DealCardHandler(bool hiddenCard, Player player)
        {
            Card c = m_deck.GetCard();
            c.Show(hiddenCard);
            player.DealCard(c);
            foreach (IDrawCardObserver o in m_observers)
            {

                o.DrawCard(c);
            }
        }
开发者ID:jt222ii,项目名称:Workshop3Blackjack,代码行数:11,代码来源:Dealer.cs

示例15: Deal

        public void Deal(Player person, Boolean value)
        {
            Card c = m_deck.GetCard();
            c.Show(value);
            person.DealCard(c);

            foreach (var observer in m_observer)
            {
                observer.cardDrawn(c);
            }
        }
开发者ID:ed222gg,项目名称:1DV607,代码行数:11,代码来源:Dealer.cs


注:本文中的BlackJack.model.Player.DealCard方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。