Esempio n. 1
0
        public bool Join(Player player)
        {
            bool re = false;
            for (int i = 0; i < 8; i++)
            {
                if (Players[i] == null)
                {
                    Players[i] = player;
                    re = true;
                    break;
                }
            }
            if (re)
            {
                player.JoinBattle(this);
                isFull = Players.Count(p => p != null) == 8;
            }

            return re;
        }
Esempio n. 2
0
 public Battle(Player player)
     : this(player.Udemae)
 {
     Players[0] = player;
     player.JoinBattle(this);
 }
Esempio n. 3
0
 public void SomeOneReset()
 {
     var reset = GB.Random.Next(ResetMin, ResetMax);
     var indexes = Enumerable.Range(0, PlayerCount).OrderBy(p => GB.Random.NextDouble()).Take(reset);
     foreach (var item in indexes)
     {
         Players[item] = new Player(PlayerStrengthFunc());
     }
 }