Class: SimpleMazeStyle

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeSimpleMazeStyle

Returns a new instance of SimpleMazeStyle.



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

def initialize
  @width = 1
  @height = 1
end

Instance Attribute Details

#heightObject (readonly)

Returns the value of attribute height.



2
3
4
# File 'lib/my_own_maze/style/simple_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/simple_maze_style.rb', line 2

def width
  @width
end

Instance Method Details

#player_styleObject



9
10
11
# File 'lib/my_own_maze/style/simple_maze_style.rb', line 9

def player_style
  ['P']
end

#result_styleObject



21
22
23
# File 'lib/my_own_maze/style/simple_maze_style.rb', line 21

def result_style
  ['-']
end

#road_styleObject



17
18
19
# File 'lib/my_own_maze/style/simple_maze_style.rb', line 17

def road_style
  [' ']
end

#wall_styleObject



13
14
15
# File 'lib/my_own_maze/style/simple_maze_style.rb', line 13

def wall_style
  ['='.bg_cyan]
end