Exemplo n.º 1
0
        public static List <Player> LowestRanked(List <Player> players)
        {
            List <Player> minList = new List <Player>();

            if (players.Count == 0)
            {
                return(minList);
            }

            PlayerRank min = players[0].Rank;

            foreach (Player player in players)
            {
                if (player.rank < min)
                {
                    min = player.rank;
                }
            }

            foreach (Player player in players)
            {
                if (player.rank.Value == min.Value)
                {
                    minList.Add(player);
                }
            }

            return(minList);
        }
Exemplo n.º 2
0
 public Player(string username, QuestMatch match = null)
 {
     this.Converter.Json = new PlayerJsonConversion();
     this.match          = match;
     this.username       = username;
     this.rank           = new PlayerRank(this);
     this.hand           = new Hand(this);
     this.battleArea     = new PlayerArea();
 }
Exemplo n.º 3
0
        public static List <Player> HighestRanked(List <Player> players)
        {
            List <Player> maxList = new List <Player>();

            PlayerRank max = new PlayerRank();

            foreach (Player player in players)
            {
                if (player.rank > max)
                {
                    max = player.rank;
                }
            }

            foreach (Player player in players)
            {
                if (player.rank.Value == max.Value)
                {
                    maxList.Add(player);
                }
            }

            return(maxList);
        }