示例#1
0
        private IDictionary <Guid, IPlayerHoleCards> CreateToPlayerWithHoleCards(ICard firstCardFirstPlayer, ICard secondCardFirstPlayer, ICard firstCardSecondPlayer, ICard secondCardSecondPlayer)
        {
            var player1 = builder.CreateNewPlayer(Guid.NewGuid());
            var player2 = builder.CreateNewPlayer(Guid.NewGuid());
            var players = new Dictionary <Guid, IPlayerHoleCards> {
                { player1Guid, player1 }, { player2Guid, player2 }
            };

            player1.AddHoleCards(firstCardFirstPlayer, secondCardFirstPlayer);
            player2.AddHoleCards(firstCardSecondPlayer, secondCardSecondPlayer);
            return(players);
        }
示例#2
0
        private Dictionary <Guid, IPlayerHoleCards> CreatePlayerHoleCards()
        {
            var ps = new Dictionary <Guid, IPlayerHoleCards>();

            foreach (var item in players)
            {
                var p = builder.CreateNewPlayer(item.Key);
                p.AddHoleCards(item.Value.FirstHoleCard, item.Value.SecondHoleCard);
                ps.Add(item.Key, p);
            }

            return(ps);
        }
示例#3
0
 public void Initialize()
 {
     texasHoldEmBuilder = new TexasHoldEmEngineBuilder();
     player             = texasHoldEmBuilder.CreateNewPlayer(defaultGuid);
 }