Exemple #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;
        }
Exemple #2
0
 public Battle(Player player)
     : this(player.Udemae)
 {
     Players[0] = player;
     player.JoinBattle(this);
 }