Ejemplo n.º 1
0
        //helper for architect
        private static bool markTaken(bool[,] taken, Coordinate[] list)
        {
            for (int i = 0; i < list.GetUpperBound(0)+1; i++)
            {
                if (taken[list[i].x, list[i].y]) return false; //failed already taken

                taken[list[i].x, list[i].y] = true;
            }

            return true;
        }
Ejemplo n.º 2
0
        //helper for architect
        private static void buildWalls(Floor f, Coordinate[] place)
        {
            Tile[,] floor = f.floor;
            ArrayList coordinates = f.coordinates;

            for (int i = 0; i < place.GetUpperBound(0) + 1; i++)
            {
                int x = place[i].x;
                int y = place[i].y;
                floor[x, y].Obj = new Wall();
                coordinates.Add(new NamedCoord("Wall", new Coordinate(x,y), 0));
            }
        }