/// <summary> /// Makes an edge grid for this grid. /// </summary> public IGrid <TNewCell, PointyRhombPoint> MakeEdgeGrid <TNewCell>() { var edges = this.SelectMany(x => x.GetEdges()); var storage = PointyRhombGrid <TNewCell> .CalculateStorage(edges); var offset = PointyRhombGrid <TNewCell> .GridPointFromArrayPoint(storage.offset); return(new PointyRhombGrid <TNewCell>(storage.dimensions.X + 2, storage.dimensions.Y + 2, x => IsInsideEdgeGrid(x + offset), offset)); }
protected override PointyHexPoint GridPointFromArrayPoint(ArrayPoint point) { return(PointyRhombGrid <TCell> .GridPointFromArrayPoint(point)); }