public static CustomBasicList <string> GetSalaryList(this CustomBasicList <LifeBoardGamePlayerItem> tempList)
        {
            CustomBasicList <string> output = new CustomBasicList <string>();

            tempList.ForConditionalItems(items => items.Salary > 0, thisPlayer => output.Add(thisPlayer.NickName));
            return(output);
        }
Example #2
0
 private void ReportItems(EnumCommandBusyCategory thisBusy)
 {
     _commandList.ForConditionalItems(items => items.BusyCategory == thisBusy
                                      , items => items.ReportCanExecuteChange());
     _controlList.ForConditionalItems(items => items.BusyCategory == thisBusy
                                      , items => items.ReportCanExecuteChange());
 }
        public void FixNetworkedPlayers(string yourName)
        {
            CustomBasicList <P> tempList = _privateDict.Values.ToCustomBasicList();

            tempList.ForConditionalItems(items => items.PlayerCategory != EnumPlayerCategory.Computer, Items =>
            {
                if (Items.NickName == yourName)
                {
                    Items.PlayerCategory = EnumPlayerCategory.Self;
                }
                else
                {
                    Items.PlayerCategory = EnumPlayerCategory.OtherHuman;
                }
            });
        }
        public void ForConditionalItems(Predicate <P> match, Action <P> action) //decided to do this way.
        {
            CustomBasicList <P> privateList = _privateDict.Values.ToCustomBasicList();

            privateList.ForConditionalItems(match, action);
        }