Class: MazeStyle

Inherits:
Object
  • Object
show all
Defined in:
lib/my_own_maze/style/maze_style.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMazeStyle

Returns a new instance of MazeStyle.



4
5
6
7
# File 'lib/my_own_maze/style/maze_style.rb', line 4

def initialize
  @width = 3
  @height = 2
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



2
3
4
# File 'lib/my_own_maze/style/maze_style.rb', line 2

def height
  @height
end

#widthObject (readonly)

Returns the value of attribute width.



2
3
4
# File 'lib/my_own_maze/style/maze_style.rb', line 2

def width
  @width
end

Instance Method Details

#player_styleObject



9
10
11
12
13
14
# File 'lib/my_own_maze/style/maze_style.rb', line 9

def player_style
  [
    ' O ',
    '/> '
  ]
end

#result_styleObject



30
31
32
33
34
35
# File 'lib/my_own_maze/style/maze_style.rb', line 30

def result_style
  [
    ' - ',
    ' - '
  ]
end

#road_styleObject



23
24
25
26
27
28
# File 'lib/my_own_maze/style/maze_style.rb', line 23

def road_style
  [
    '   ',
    '   '
  ]
end

#wall_styleObject



16
17
18
19
20
21
# File 'lib/my_own_maze/style/maze_style.rb', line 16

def wall_style
  [
    '==='.bg_cyan,
    '==='.bg_cyan
  ]
end