• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# model.Player类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Player类属于BlackJack.model命名空间,在下文中一共展示了Player类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: 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


示例2: 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


示例3: 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


示例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: StartNewRound

 public void StartNewRound(Player a_player)
 {
     if (m_deck == null)
     {
         m_deck = new Deck();
         m_startGameRule.StartNewRound(a_player, this, m_deck);
     }
 }
开发者ID:tobias-dv-lnu,项目名称:1dv607_2015,代码行数:8,代码来源:Dealer.cs


示例7: Game

 public Game(AbstractRulesFactory ruleSet)
 {
     rules = new RulesFactory(ruleSet);
     m_dealer = new Dealer(rules);
     //m_dealer = new Dealer(new rules.RulesFactory(ruleSet));
     m_player = new Player();
     PrepareGetRules();
 }
开发者ID:kristofferlind,项目名称:1dv407-ooad,代码行数:8,代码来源:Game.cs


示例8: IsDealerWinner

 public bool IsDealerWinner(Player a_player)
 {
     if (m_winRule.DealerWins(a_player.CalcScore(), CalcScore(), m_maxScoreRule.MaxScore()))
     {
         return true;
     }
     return false;
 }
开发者ID:DevRobDev,项目名称:1DV407,代码行数:8,代码来源:Dealer.cs


示例9: IsGameOver

 public bool IsGameOver(Player a_player)
 {
     if (m_deck != null && /*CalcScore() >= g_hitLimit*/ ((m_hitRule.DoHit(this) != true) || a_player.CalcScore() >= 21))
     {
         return true;
     }
     return false;
 }
开发者ID:ej222ru,项目名称:1DV607_WS3,代码行数:8,代码来源:Dealer.cs


示例10: NewGame

 public bool NewGame(Player a_player)
 {
     if (m_deck == null || IsGameOver())
     {
         m_deck = new Deck();
         return m_newGameRule.NewGame(this, a_player);
     }
     return false;
 }
开发者ID:ed222gg,项目名称:1DV607,代码行数:9,代码来源:Dealer.cs


示例11: Hit

 public bool Hit(Player a_player)
 {
     if (m_deck != null && a_player.CalcScore() < g_maxScore && !IsGameOver(a_player))
     {
         GetAndGiveNewCard(a_player, true);
         return true;
     }
     return false;
 }
开发者ID:mw222rs,项目名称:blackjack_csharp,代码行数:9,代码来源:Dealer.cs


示例12: Main

        static void Main(string[] args)
        {
            model.Dealer d = new model.Dealer();
            model.Player p = new model.Player();
            view.Console v = new view.Console();
            controller.Player c = new controller.Player();

            while (c.PlayGame(v, d, p)) ;
        }
开发者ID:henceee,项目名称:1dv607_2015,代码行数:9,代码来源:Program.cs


示例13: Hit

 public bool Hit(Player a_player)
 {
     if (m_deck != null && a_player.CalcScore() < m_winnerRule.maxScore && !IsGameOver())
     {
         DealCard(true, a_player);
         return true;
     }
     return false;
 }
开发者ID:rn222cx,项目名称:1dv607-OOP,代码行数:9,代码来源:Dealer.cs


示例14: 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


示例15: Hit

 public bool Hit(Player a_player)
 {
     if (m_deck != null && a_player.CalcScore() < m_maxScoreRule.MaxScore() && !IsGameOver())
     {
         Deal(a_player, true);
         return true;
     }
     return false;
 }
开发者ID:DevRobDev,项目名称:1DV407,代码行数:9,代码来源:Dealer.cs


示例16: Hit

 public bool Hit(Player a_player)
 {
     if (m_deck != null && a_player.CalcScore() < g_maxScore && !IsGameOver())
     {
         DealCardToPlayer(a_player);
         return true;
     }
     return false;
 }
开发者ID:of222au,项目名称:1DV607-Objektorienterad-analys-och-design-med-UML,代码行数:9,代码来源:Dealer.cs


示例17: Hit

 public bool Hit(Player a_player)
 {
     if (m_deck != null && a_player.CalcScore() < g_maxScore && !IsGameOver())
     {
         DrawCardAndShowCard(a_player, true);
         return true;
     }
     return false;
 }
开发者ID:Marco30,项目名称:1DV607-Workshops,代码行数:9,代码来源:Dealer.cs


示例18: 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


示例19: 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


示例20: Hit

        public bool Hit(Player a_player)
        {
            if (m_deck != null && a_player.CalcScore() < m_winRule.MaxScore && !IsGameOver())
            {
                GetCardAndShow(a_player);

                return true;
            }
            return false;
        }
开发者ID:johnnypesola,项目名称:blackjack_csharp,代码行数:10,代码来源:Dealer.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TagInterface.Flags类代码示例发布时间:2022-05-24
下一篇:
C# Bjd.Kernel类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap