class MazeMagic::Grid
Attributes
height[R]
start_x[R]
start_y[R]
width[R]
Public Class Methods
new(width:, height:, start_x: 0, start_y: 0)
click to toggle source
# File lib/maze_magic/grid.rb, line 9 def initialize(width:, height:, start_x: 0, start_y: 0) @width = width @height = height @start_x = start_x @start_y = start_y end
Private Instance Methods
grid_map()
click to toggle source
# File lib/maze_magic/grid.rb, line 18 def grid_map @grid_map ||= Array.new(height) { Array.new(width, 0) } end