Class: MazeStyle
- Inherits:
-
Object
- Object
- MazeStyle
- Defined in:
- lib/my_own_maze/style/maze_style.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize ⇒ MazeStyle
constructor
A new instance of MazeStyle.
- #player_style ⇒ Object
- #result_style ⇒ Object
- #road_style ⇒ Object
- #wall_style ⇒ Object
Constructor Details
#initialize ⇒ MazeStyle
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
#height ⇒ Object (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 |
#width ⇒ Object (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_style ⇒ Object
9 10 11 12 13 14 |
# File 'lib/my_own_maze/style/maze_style.rb', line 9 def player_style [ ' O ', '/> ' ] end |
#result_style ⇒ Object
30 31 32 33 34 35 |
# File 'lib/my_own_maze/style/maze_style.rb', line 30 def result_style [ ' - ', ' - ' ] end |
#road_style ⇒ Object
23 24 25 26 27 28 |
# File 'lib/my_own_maze/style/maze_style.rb', line 23 def road_style [ ' ', ' ' ] end |
#wall_style ⇒ Object
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 |