示例#1
0
        /**
         *      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);
        }
示例#2
0
        /**
         *      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);
        }
示例#3
0
        /**
         *      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);
        }
示例#4
0
        /**
         *      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);
        }
示例#5
0
        /**
         *      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);
        }