예제 #1
0
        public LogicCard GetOneCardFromDeck(List <LogicCard> cards)
        {
            LogicCard card = cards[cards.Count - 1];

            cards.RemoveAt(cards.Count - 1);
            return(card);
        }
예제 #2
0
        public List <LogicCard> DealRiver(List <LogicCard> cards)
        {
            List <LogicCard> river = new List <LogicCard>();

            LogicCard first = GetOneCardFromDeck(cards);

            river.Add(first);
            return(river);
        }
예제 #3
0
        public List <LogicCard> DealTurn(List <LogicCard> cards)
        {
            List <LogicCard> turn = new List <LogicCard>();

            LogicCard first = GetOneCardFromDeck(cards);

            turn.Add(first);
            return(turn);
        }
예제 #4
0
        public List <LogicCard> DealHand(List <LogicCard> cards)
        {
            List <LogicCard> handToGive = new List <LogicCard>();

            LogicCard first  = GetOneCardFromDeck(cards);
            LogicCard second = GetOneCardFromDeck(cards);

            handToGive.Add(first);
            handToGive.Add(second);
            return(handToGive);
        }
예제 #5
0
        public List <LogicCard> DealFlop(List <LogicCard> cards)
        {
            List <LogicCard> flop = new List <LogicCard>();
            //without burned one
            LogicCard first  = GetOneCardFromDeck(cards);
            LogicCard second = GetOneCardFromDeck(cards);
            LogicCard third  = GetOneCardFromDeck(cards);

            flop.Add(first);
            flop.Add(second);
            flop.Add(third);
            return(flop);
        }
예제 #6
0
        public List <LogicCard> GenerateDeck()
        {
            List <LogicCard> cardsToReturn = new List <LogicCard>();

            foreach (Colors color in Enum.GetValues(typeof(Colors)))
            {
                foreach (Figures figure in Enum.GetValues(typeof(Figures)))
                {
                    LogicCard cartToAdd = new LogicCard(figure, color);
                    cardsToReturn.Add(cartToAdd);
                }
            }
            var rnd           = new Random();
            var shuffledCards = cardsToReturn.OrderBy(card => rnd.Next()).ToList();

            return(shuffledCards);
        }