public HiddenCards(GolfCardGameGameContainer gameContainer) : base(gameContainer.Command, gameContainer.Aggregator)
        {
            _gameContainer = gameContainer;
            Rows           = 1;
            Columns        = 2;
            HasFrame       = true;
            Style          = EnumStyleList.SingleCard;
            HasText        = true;
            //no visible.  hopefully works properly (?)
            //Visible = false;
            LoadBoard();
            IsEnabled = false; //try this too (?)
            if (PileList !.Count != 2)
            {
                throw new BasicBlankException("Must have 2 piles");
            }
            PileClickedAsync += HiddenCards_PileClickedAsync;
            int x = 0;

            PileList.ForEach(thisPile =>
            {
                x++;
                thisPile.Text = $"Card {x}";
            });
        }
Esempio n. 2
0
        public int PointsPlayed(int player, DeckRegularDict <DutchBlitzCardInformation> otherList)
        {
            int output = 0;

            PileList.ForEach(thisPile =>
            {
                var tempList = thisPile.ObjectList.ToRegularDeckDict();
                output      += tempList.Count(items => items.Player == player);
            });
            output += otherList.Count(items => items.Player == player);
            return(output);
        }