Exemple #1
0
 private void AddCardsPictureBox(ICardHolder cardHolder)
 {
     foreach (PictureBox pictureBox in cardHolder.PictureBoxHolder)
     {
         this.Controls.Add(pictureBox);
     }
 }
Exemple #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Node"/> class.
        /// </summary>
        /// <param name="cardHolder">The card holder.</param>
        /// <param name="card">The card.</param>
        public Node(ICardHolder cardHolder, Card card)
        {
            Contract.Requires<ArgumentNullException>(cardHolder != null, "cardHolder");
            Contract.Requires<ArgumentNullException>(card != null, "card");

            this.CardHolder = cardHolder;
            this.Card = card;
        }
 public Badge_REP_LOCAL(IBadge badge_REP, ICardHolder cardHolder_REP, IReader reader_REP, IConfiguration config)
 {
     _badge_REP      = badge_REP;
     _cardHolder_REP = cardHolder_REP;
     _reader_REP     = reader_REP;
     _config         = config;
     _path           = _config.GetSection("SERVER_PATH").Value.ToString();
     _user           = _config.GetSection("SERVER_USER").Value.ToString();
     _pass           = _config.GetSection("SERVER_PASSWORD").Value.ToString();
 }
Exemple #4
0
        private async Task SetCardToCharacters(ICardHolder cardHandler, int cardHandlerIndex, int cardsCountToSet)
        {
            var cards = new List<ICard>();
            for (int i = 0; i < cardsCountToSet; i++)
            {
                cards.Add(this.cards[cardHandlerIndex * cardsCountToSet + i]);
            }

            await cardHandler.SetAllCards(cards);
        }
Exemple #5
0
        private async Task SetCardToDealer(ICardHolder cardHandler, int cardsCountToSet, int allPlayersCardsCount)
        {
            IList<ICard> cards = new List<ICard>();
            for (int i = 0; i < cardsCountToSet; i++)
            {
                cards.Add(this.Cards[allPlayersCardsCount + i]);
            }

            await cardHandler.SetCards(cards);
        }
Exemple #6
0
        private async Task SetCardToPokerManager(ICardHolder cardHandler, int cardsCountToSet, int allPlayersCardsCount)
        {
            var cards = new List <ICard>();

            for (int i = 0; i < cardsCountToSet; i++)
            {
                cards.Add(this.cards[allPlayersCardsCount + i]);
            }

            await cardHandler.SetAllCards(cards);
        }
Exemple #7
0
        private async Task SetCardToCharacters(ICardHolder cardHandler, int cardHandlerIndex, int cardsCountToSet)
        {
            var cards = new List <ICard>();

            for (int i = 0; i < cardsCountToSet; i++)
            {
                cards.Add(this.cards[cardHandlerIndex * cardsCountToSet + i]);
            }

            await cardHandler.SetAllCards(cards);
        }
 public CardHolder_REP_LOCAL(ICardHolder cardHolder_REP, IBadge_REP_LOCAL badge_REP_LOCAL,
                             IDataConduITMgr dataConduITMgr, IConfiguration config)
 {
     _cardHolder_REP  = cardHolder_REP;
     _badge_REP_LOCAL = badge_REP_LOCAL;
     _dataConduITMgr  = dataConduITMgr;
     _config          = config;
     _path            = _config.GetSection("SERVER_PATH").Value.ToString();
     _user            = _config.GetSection("SERVER_USER").Value.ToString();
     _pass            = _config.GetSection("SERVER_PASSWORD").Value.ToString();
 }
 public StalkerHelper(ICardHolder holder)
 {
     this.cardHolder = holder;
 }
Exemple #10
0
 public CardHolder_REP_LOCAL(ICardHolder cardHolder_REP)
 {
     _cardHolder_REP = cardHolder_REP;
 }
Exemple #11
0
 public CardChooser(ICardHolder cardHolder, IStalkerHelper stalkerHelper)
 {
     this.cardHolder = cardHolder;
     this.stalkerHelper = stalkerHelper;
 }
Exemple #12
0
 bool? node(ICardHolder holder, Card card)
 {
     return this.game.Nodes.Where(n => n.CardHolder == holder && n.Card == card).First().IsSelected;
 }
Exemple #13
0
 bool? node(ICardHolder holder, string cardName)
 {
     return this.game.Nodes.Where(n => n.CardHolder == holder && n.Card.Name == cardName).First().IsSelected;
 }
Exemple #14
0
 private void AddCardsPictureBox(ICardHolder cardHolder)
 {
     foreach (PictureBox pictureBox in cardHolder.PictureBoxHolder)
     {
         this.Controls.Add(pictureBox);
     }
 }
 public StalkerPlayer()
 {
     this.cardHolder = new CardHolder();
     this.stalkerHelper = new StalkerHelper(this.cardHolder);
     this.cardChooser = new CardChooser(this.cardHolder, this.stalkerHelper);
 }
Exemple #16
0
 /// <summary>
 /// Prints an individual grid row.
 /// </summary>
 /// <param name="player">The player.</param>
 /// <param name="cards">The cards.</param>
 private void PrintGridRow(ICardHolder player, IEnumerable<Card> cards)
 {
     string name = (player is Player) ? (player as Player).Name : "Case File";
     Console.Write("{0,-" + this.playerColumnWidth + "} ", name);
     foreach (Card card in cards) {
         bool? isSelected = player.HasCard(card);
         string value = "?";
         if (isSelected.HasValue) {
             value = isSelected.Value ? "1" : "0";
         }
         Console.Write(ConsoleHelper.CenterString(value, card.Name.Length, card.Name.Length + 1));
     }
     Console.WriteLine();
 }