Ejemplo n.º 1
0
    // 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);
    }
Ejemplo n.º 2
0
 // 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;
 }