Class GridFactory

java.lang.Object
com.csse3200.game.areas.terrain.GridFactory

public class GridFactory extends Object
  • Constructor Details

    • GridFactory

      public GridFactory()
      Create a grid factory with Orthogonal orientation
    • GridFactory

      public GridFactory(GridComponent.GridOrientation orientation)
      Create a grid factory
      Parameters:
      orientation - orientation for the grid system
  • Method Details

    • createGrid

      public GridComponent createGrid(float tileSize)
      Create a grid with default map size
      Parameters:
      tileSize - Size of each tile in world units
      Returns:
      GridComponent for spatial calculations
    • createGrid

      public GridComponent createGrid(com.badlogic.gdx.math.GridPoint2 mapSize, float tileSize)
      Create a grid with specified dimensions
      Parameters:
      mapSize - Dimensions of the grid in tiles
      tileSize - Size of each tile in world units
      Returns:
      GridComponent for spatial calculations