/** * Returns a new grid, wrapped along a Hexagon with the given side length. * * @since 1.7 * */ public static WrappedGrid <TCell, PointyHexPoint> WrappedHexagon(int side) { var grid = Hexagon(side); var wrapper = new PointyHexHexagonWrapper(side); var wrappedGrid = new WrappedGrid <TCell, PointyHexPoint>(grid, wrapper); return(wrappedGrid); }
/** * Returns a grid wrapped horizontally along a parallelogram. * * @version1_7 */ public static WrappedGrid <TCell, PointyHexPoint> HorizontallyWrappedRectangle(int width, int height) { var grid = Rectangle(width, height); var wrapper = new PointyHexHorizontalRectangleWrapper(width); var wrappedGrid = new WrappedGrid <TCell, PointyHexPoint>(grid, wrapper); return(wrappedGrid); }
/** * Returns a grid wrapped horizontally along a parallelogram. * * @since 1.7 */ public static WrappedGrid <TCell, FlatHexPoint> HorizontallyWrappedParallelogram(int width, int height) { var grid = Parallelogram(width, height); var wrapper = new FlatHexHorizontalWrapper(width); var wrappedGrid = new WrappedGrid <TCell, FlatHexPoint>(grid, wrapper); return(wrappedGrid); }
/** * Returns a grid wrapped vertically along a parallelogram. * * @since 1.7 */ public static WrappedGrid <TCell, RectPoint> VerticallyWrappedParallelogram(int width, int height) { var grid = Parallelogram(width, height); var wrapper = new RectVerticalWrapper(height); var wrappedGrid = new WrappedGrid <TCell, RectPoint>(grid, wrapper); return(wrappedGrid); }
/** * Returns a grid wrapped along a parallelogram. * * @since 1.7 */ public static WrappedGrid <TCell, PointyHexPoint> WrappedParallelogram(int width, int height) { var grid = Parallelogram(width, height); var wrapper = new PointyHexParallelogramWrapper(width, height); var wrappedGrid = new WrappedGrid <TCell, PointyHexPoint>(grid, wrapper); return(wrappedGrid); }