Class: SimpleMazeStyle
- Inherits:
-
Object
- Object
- SimpleMazeStyle
- Defined in:
- lib/my_own_maze/style/simple_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 ⇒ SimpleMazeStyle
constructor
A new instance of SimpleMazeStyle.
- #player_style ⇒ Object
- #result_style ⇒ Object
- #road_style ⇒ Object
- #wall_style ⇒ Object
Constructor Details
#initialize ⇒ SimpleMazeStyle
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
#height ⇒ Object (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 |
#width ⇒ Object (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_style ⇒ Object
9 10 11 |
# File 'lib/my_own_maze/style/simple_maze_style.rb', line 9 def player_style ['P'] end |
#result_style ⇒ Object
21 22 23 |
# File 'lib/my_own_maze/style/simple_maze_style.rb', line 21 def result_style ['-'] end |
#road_style ⇒ Object
17 18 19 |
# File 'lib/my_own_maze/style/simple_maze_style.rb', line 17 def road_style [' '] end |
#wall_style ⇒ Object
13 14 15 |
# File 'lib/my_own_maze/style/simple_maze_style.rb', line 13 def wall_style ['='.bg_cyan] end |