示例#1
0
        public void AntHill(int row, int col, int team)
        {
            AntHill hill = new AntHill(row, col, team);

            if (team == 0)
            {
                if (Map[row, col] == Tile.Land)
                {
                    Map[row, col] = Tile.HillMine;
                }

                MyHills.Add(hill);
            }
            else
            {
                if (Map[row, col] == Tile.Land)
                {
                    Map[row, col] = Tile.HillEnemy;
                }

                // exists?
                if (EnemyHills.FirstOrDefault(x => x.EqualTo(hill)) == null)
                {
                    EnemyHills.Add(hill);
                }
            }
        }
示例#2
0
        public void AntHill(int row, int col, int team)
        {
            AntHill hill = new AntHill(row, col, team);

            map[col, row].isActiveHill = true;
            if (team == 0)
            {
                MyHills.Add(hill);
                map[col, row].isMyHill = true;
            }
            else
            {
                EnemyHills.Add(hill);
                map[col, row].isEnemyHill = true;
            }
        }
示例#3
0
        public void AntHill(int row, int col, int team)
        {
            if (map[row, col] == Tile.Land)
            {
                map[row, col] = Tile.Hill;
            }

            AntHill hill = new AntHill(row, col, team);

            if (team == 0)
            {
                MyHills.Add(hill);
            }
            else
            {
                EnemyHills.Add(hill);
            }
        }