Class: Maze::Formatter::Png::Sigma

Inherits:
Object
  • Object
show all
Includes:
Maze::Formatter::Png
Defined in:
lib/maze/formatters/png/sigma.rb

Constant Summary

Constants included from Maze::Formatter::Png

LENGTH, PADDING

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Maze::Formatter::Png

#draw

Constructor Details

#initialize(maze) ⇒ Sigma

Returns a new instance of Sigma.



12
13
14
15
16
17
18
# File 'lib/maze/formatters/png/sigma.rb', line 12

def initialize(maze)
  @maze    = maze
  @image   = ChunkyPNG::Image.new(width, height, background_colour)
  @lines   = []

  draw_image
end

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.



8
9
10
# File 'lib/maze/formatters/png/sigma.rb', line 8

def image
  @image
end

#linesObject (readonly)

Returns the value of attribute lines.



8
9
10
# File 'lib/maze/formatters/png/sigma.rb', line 8

def lines
  @lines
end

#mazeObject (readonly)

Returns the value of attribute maze.



8
9
10
# File 'lib/maze/formatters/png/sigma.rb', line 8

def maze
  @maze
end