class PyramidLayout

  getter positions_data : Array(Array(Int32)) = [[24, 0, 1], [22, 0, 1], [20, 0, 1], [18, 0, 1], [16, 0, 1], [14, 0, 1], [12, 0, 1],
    [10, 0, 1], [8, 0, 1], [6, 0, 1], [4, 0, 1], [2, 0, 1], [20, 2, 1], [18, 2, 1], [16, 2, 1], [14, 2, 1],
    [12, 2, 1], [10, 2, 1], [8, 2, 1], [6, 2, 1], [22, 4, 1], [20, 4, 1], [18, 4, 1], [16, 4, 1], [14, 4, 1],
    [12, 4, 1], [10, 4, 1], [8, 4, 1], [6, 4, 1], [4, 4, 1], [28, 7, 1], [26, 7, 1], [24, 6, 1], [22, 6, 1],
    [20, 6, 1], [18, 6, 1], [16, 6, 1], [14, 6, 1], [12, 6, 1], [10, 6, 1], [8, 6, 1], [6, 6, 1], [4, 6, 1],
    [2, 6, 1], [24, 8, 1], [22, 8, 1], [20, 8, 1], [18, 8, 1], [16, 8, 1], [14, 8, 1], [12, 8, 1], [10, 8, 1],
    [8, 8, 1], [6, 8, 1], [4, 8, 1], [2, 8, 1], [0, 7, 1], [22, 10, 1], [20, 10, 1], [18, 10, 1], [16, 10, 1],
    [14, 10, 1], [12, 10, 1], [10, 10, 1], [8, 10, 1], [6, 10, 1], [4, 10, 1], [20, 12, 1], [18, 12, 1],
    [16, 12, 1], [14, 12, 1], [12, 12, 1], [10, 12, 1], [8, 12, 1], [6, 12, 1], [24, 14, 1], [22, 14, 1], 
    [20, 14, 1], [18, 14, 1], [16, 14, 1], [14, 14, 1], [12, 14, 1], [10, 14, 1], [8, 14, 1], [6, 14, 1], 
    [4, 14, 1], [2, 14, 1], [18, 2, 2], [16, 2, 2], [14, 2, 2], [12, 2, 2], [10, 2, 2], [8, 2, 2], [18, 4, 2],
    [16, 4, 2], [14, 4, 2], [12, 4, 2], [10, 4, 2], [8, 4, 2], [18, 6, 2], [16, 6, 2], [14, 6, 2], [12, 6, 2],
    [10, 6, 2], [8, 6, 2], [18, 8, 2], [16, 8, 2], [14, 8, 2], [12, 8, 2], [10, 8, 2], [8, 8, 2], [18, 10, 2],
    [16, 10, 2], [14, 10, 2], [12, 10, 2], [10, 10, 2], [8, 10, 2], [18, 12, 2], [16, 12, 2], [14, 12, 2], 
    [12, 12, 2], [10, 12, 2], [8, 12, 2], [16, 4, 3], [14, 4, 3], [12, 4, 3], [10, 4, 3], [16, 6, 3], 
    [14, 6, 3], [12, 6, 3], [10, 6, 3], [16, 8, 3], [14, 8, 3], [12, 8, 3], [10, 8, 3], [16, 10, 3],
    [14, 10, 3], [12, 10, 3], [10, 10, 3], [14, 6, 4], [12, 6, 4], [14, 8, 4], [12, 8, 4], [13, 7, 5]]

  getter top_blocks : Array(Array(Int32)) = [[] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [87], [88], [89], [90], [91],
    [92], [] of Int32, [] of Int32, [] of Int32, [93], [94], [95], [96], [97], [98], [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [99], [100], [101],
    [102], [103], [104], [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [105], [106], [107], [108], [109], [110], [] of Int32, [] of Int32, [] of Int32, [] of Int32, 
    [] of Int32, [] of Int32, [111], [112], [113], [114], [115], [116], [] of Int32, [] of Int32, [] of Int32, [117], [118], [119], [120], [121], [122],
    [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [123], [124], [125], [126],
    [] of Int32, [] of Int32, [127], [128], [129], [130], [] of Int32, [] of Int32, [131], [132], [133], [134], [] of Int32, [] of Int32, [135], [136], [137], [138],
    [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [139], [140], [] of Int32, [] of Int32, [141], [142], [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32,
    [143], [143], [143], [143], [] of Int32]

  getter left_blocks : Array(Array(Int32)) = [[] of Int32, [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [] of Int32, [] of Int32, [14], [15], [16], 
    [17], [18], [19], [] of Int32, [] of Int32, [22], [23], [24], [25], [26], [27], [28], [29], [] of Int32, [] of Int32, [44, 32], [33], [34],
    [35], [36], [37], [38], [39], [40], [41], [42], [43], [56], [45], [46], [47], [48], [49], [50], [51], [52],
    [53], [54], [55], [56], [] of Int32, [] of Int32, [59], [60], [61], [62], [63], [64], [65], [66], [] of Int32, [] of Int32, [69], [70], [71],
    [72], [73], [74], [] of Int32, [] of Int32, [77], [78], [79], [80], [81], [82], [83], [84], [85], [86], [] of Int32, [] of Int32, [89], [90], 
    [91], [92], [] of Int32, [] of Int32, [95], [96], [97], [98], [] of Int32, [] of Int32, [101], [102], [103], [104], [] of Int32, [] of Int32, [107], [108], [109],
    [110], [] of Int32, [] of Int32, [113], [114], [115], [116], [] of Int32, [] of Int32, [119], [120], [121], [122], [] of Int32, [] of Int32, [125], [126], [] of Int32, [] of Int32,
    [129], [130], [] of Int32, [] of Int32, [133], [134], [] of Int32, [] of Int32, [137], [138], [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32]

  getter right_blocks : Array(Array(Int32)) = [[] of Int32, [0], [1], [2], [3], [4], [5], [6], [7], [8], [9], [] of Int32, [] of Int32, [12], [13], [14], [15],
    [16], [17], [] of Int32, [] of Int32, [20], [21], [22], [23], [24], [25], [26], [27], [] of Int32, [] of Int32, [30], [31], [32], [33], [34], 
    [35], [36], [37], [38], [39], [40], [41], [42], [31], [44], [45], [46], [47], [48], [49], [50], [51], [52], 
    [53], [54], [] of Int32, [] of Int32, [57], [58], [59], [60], [61], [62], [63], [64], [] of Int32, [] of Int32, [67], [68], [69], [70], [71], 
    [72], [] of Int32, [] of Int32, [75], [76], [77], [78], [79], [80], [81], [82], [83], [84], [] of Int32, [] of Int32, [87], [88], [89], [90], 
    [] of Int32, [] of Int32, [93], [94], [95], [96], [] of Int32, [] of Int32, [99], [100], [101], [102], [] of Int32, [] of Int32, [105], [106], [107], [108], [] of Int32, 
    [] of Int32, [111], [112], [113], [114], [] of Int32, [] of Int32, [117], [118], [119], [120], [] of Int32, [] of Int32, [123], [124], [] of Int32, [] of Int32, [127], 
    [128], [] of Int32, [] of Int32, [131], [132], [] of Int32, [] of Int32, [135], [136], [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32, [] of Int32]

  getter positions : Array(Position)

  def initialize
    @positions = Array(Position).new
    @positions_data.each do |pos|
      @positions << Position.new(column: pos[0], row: pos[1], layer: pos[2])
    end
  end

end

class Position
  getter column, row, layer

   def initialize(column : Int32, row : Int32, layer : Int32)
    @column = column
    @row = row
    @layer = layer
  end
end
