Class CellSet

    • Constructor Detail

      • CellSet

        public CellSet()
      • CellSet

        public CellSet​(CellSet other)
    • Method Detail

      • addAll

        public void addAll​(CellSet set)
      • size

        public int size()
      • printAsGrid

        public void printAsGrid()
      • printDebug

        public void printDebug()
      • getCellsAsString

        public String getCellsAsString()
      • copyCellSet

        public static CellSet copyCellSet​(CellSet set)
        Deep copy
        Parameters:
        set -
        Returns:
      • getType

        public int getType​(TextGrid grid)
      • translate

        public void translate​(int dx,
                              int dy)
      • addSet

        public void addSet​(CellSet set)
      • hasCommonCells

        public boolean hasCommonCells​(CellSet otherSet)
      • getFilledEquivalent

        public CellSet getFilledEquivalent​(TextGrid textGrid)
      • findCellNextTo

        public TextGrid.Cell findCellNextTo​(TextGrid.Cell cell)
        Returns the first cell that is found to be next to cell.
        Parameters:
        cell -
        Returns:
      • findCellsNextTo

        public CellSet findCellsNextTo​(TextGrid.Cell cell)
        Returns all the cells that are found to be next to cell.
        Parameters:
        cell -
        Returns:
      • appendSet

        public void appendSet​(CellSet set)
      • subtractSet

        public void subtractSet​(CellSet set)
      • getWidth

        public int getWidth()
      • getHeight

        public int getHeight()
      • getMaxX

        public int getMaxX()
      • getMinX

        public int getMinX()
      • getMaxY

        public int getMaxY()
      • getMinY

        public int getMinY()
      • breakIntoDistinctBoundaries

        public ArrayList breakIntoDistinctBoundaries​(TextGrid grid)
        Takes into account character info from the grid
        Returns:
        ArrayList of distinct BoundarySetS
      • breakIntoDistinctBoundaries

        public ArrayList breakIntoDistinctBoundaries()
        Returns:
        ArrayList of distinct BoundarySetS
      • breakTrulyMixedBoundaries

        public ArrayList breakTrulyMixedBoundaries​(TextGrid grid)
        Breaks that:
          +-----+
          |     |
          +  ---+-------------------
          |     |
          +-----+
         
        into the following 3:
          +-----+
          |     |
          +     +
          |     |
          +-----+
         
             ---
                 -------------------
         
        Parameters:
        grid -
        Returns:
        a list of boundaries that are either open or closed but not mixed and they are equivalent to the this
      • makeIntoGrid

        public TextGrid makeIntoGrid()
      • makeScaledOneThirdEquivalent

        public CellSet makeScaledOneThirdEquivalent()