// These functions generate various shapes of hex maps public static CubeList TrapezoidalShape(int minQ, int maxQ, int minR, int maxR, ToCube toCube) { var hexes = new CubeList(); foreach (int q in Enumerable.Range(minQ, minQ + maxQ + 1)) { foreach (int r in Enumerable.Range(minR, minR + maxR + 1)) { hexes.Add(toCube(new HexField(q, r))); } } return(hexes); }
// These functions generate various shapes of hex maps public static CubeList TrapezoidalShape(int minQ, int maxQ, int minR, int maxR, ToCube toCube) { var hexes = new CubeList(); foreach (int q in Enumerable.Range(minQ, minQ + maxQ + 1)) { foreach (int r in Enumerable.Range(minR, minR + maxR + 1)) { hexes.Add(toCube(new HexField(q, r))); } } return hexes; }