Esempio n. 1
0
        private void countPlayers()
        {
            SortableList <Player> players = game?.Players ?? round?.Players;

            int allPlayers    = players.Count;
            int activePlayers = players.Count(x => x.Alive && x.ID > 0);

            lblCount.Text    = $"Anzahl Spieler insgeamt: {allPlayers}";
            lblCountAll.Text = $"Anzahl Spieler noch aktiv: {activePlayers}";
        }
Esempio n. 2
0
        public SortableList <T> ApplyFilter(Func <T, bool> func)
        {
            SortableList <T> newList = new SortableList <T>();

            foreach (var item in this.Where(func))
            {
                newList.Add(item);
            }

            return(newList);
        }