예제 #1
0
        public void TestSetup()
        {
            world   = new World(new IrcClient());
            players = new List <Player>();
            for (int i = 0; i < names.Length; i++)
            {
                Player p = new Player()
                {
                    Name      = names[i],
                    Class     = classes[i],
                    Level     = Random.Next(45),
                    Nick      = $"NickName{i}",
                    UHost     = $"{Random.Next(255)}.{Random.Next(255)}.{Random.Next(255)}.{Random.Next(255)}",
                    LastLogin = DateTime.Now.AddDays(-3),
                    Align     = Random.Next(2) == 0 ? "g" : "e"
                };
                foreach (string key in p.Items.Keys)
                {
                    p.Items[key].Level = Random.Next(p.Level);
                }

                players.Add(p);
            }
            world.Players.AddRange(players);
        }
예제 #2
0
        public void TestCollisionFight()
        {
            Player        p    = players[Random.Next(players.Count)];
            List <Player> opps = players.Where(x => !x.Equals(p)).ToList();
            Player        opp  = opps[Random.Next(opps.Count)];

            world.CollisionFight(p, opp);
        }
예제 #3
0
        public void TestChallengeOpp()
        {
            Player p = players[Random.Next(players.Count)];

            world.ChallengeOpp(p);
        }
예제 #4
0
        public void TestFindItem()
        {
            Player p = players[Random.Next(players.Count)];

            world.FindItem(p);
        }