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


C# model.Player类代码示例

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


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


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