This is the current major bottleneck which affects memory usage. The GridData instance in HexagonalGridImpl holds all the necessary information for generating the possible coordinates for a given grid so we need to work around this.
As part of this task HexagonalGrid#containsCubeCoordinate also needs to be refactored. The implementation should delegate to the GridLayoutStrategy since it is used to fetch the coordinates in the first place.
This is the current major bottleneck which affects memory usage. The
GridData
instance inHexagonalGridImpl
holds all the necessary information for generating the possible coordinates for a given grid so we need to work around this.As part of this task
HexagonalGrid#containsCubeCoordinate
also needs to be refactored. The implementation should delegate to theGridLayoutStrategy
since it is used to fetch the coordinates in the first place.