Class: Maze::Formatter::Ascii::Sigma
- Inherits:
-
Object
- Object
- Maze::Formatter::Ascii::Sigma
- Includes:
- Maze::Formatter::Ascii
- Defined in:
- lib/maze/formatters/ascii/sigma.rb
Instance Attribute Summary collapse
-
#canvas ⇒ Object
readonly
Returns the value of attribute canvas.
-
#maze ⇒ Object
readonly
Returns the value of attribute maze.
Instance Method Summary collapse
-
#initialize(maze) ⇒ Sigma
constructor
A new instance of Sigma.
Methods included from Maze::Formatter::Ascii
#canvas_draw, #canvas_update, #to_s
Constructor Details
#initialize(maze) ⇒ Sigma
Returns a new instance of Sigma.
12 13 14 15 16 17 18 19 |
# File 'lib/maze/formatters/ascii/sigma.rb', line 12 def initialize(maze) @maze = maze @canvas = Array.new(maze.height * 2 + 2) do Array.new(maze.width * 2 + 2, ' ') end canvas_draw end |
Instance Attribute Details
#canvas ⇒ Object (readonly)
Returns the value of attribute canvas.
8 9 10 |
# File 'lib/maze/formatters/ascii/sigma.rb', line 8 def canvas @canvas end |
#maze ⇒ Object (readonly)
Returns the value of attribute maze.
8 9 10 |
# File 'lib/maze/formatters/ascii/sigma.rb', line 8 def maze @maze end |