Class LayoutManager


  • public class LayoutManager
    extends Object
    A simple manager that has info on empty spaces in the 2d plane. Uses n^2 space on a grid of variable density, and supports filling in O(1), but no emptying.
    Author:
    ssah
    • Constructor Detail

      • LayoutManager

        public LayoutManager​(int width,
                             int height,
                             int positionWidth,
                             int positionHeight,
                             int offsetX,
                             int offsetY)
        Parameters:
        width - width
        height - height
        positionWidth - positionWidth
        positionHeight - positionHeight
        offsetX - offsetX
        offsetY - offsetY
    • Method Detail

      • getVacantPosition

        public LayoutPosition getVacantPosition()
        Returns:
        something
      • fillPosition

        public void fillPosition​(int posX,
                                 int posY)
        Parameters:
        posX - posX
        posY - posY