Class: Pitchcar::Pieces::StraightLeftWall
- Defined in:
- lib/pieces/straight_left_wall.rb
Constant Summary
Constants inherited from Straight
Pitchcar::Pieces::Straight::IMAGE
Constants inherited from Piece
Instance Attribute Summary
Attributes inherited from Piece
#direction, #type, #x, #y
Instance Method Summary collapse
Methods inherited from Straight
#next_coordinate, #next_direction
Methods inherited from Piece
#coordinate, first_from_string, #initialize, #name, #to_h, type_from_string
Constructor Details
This class inherits a constructor from Pitchcar::Pieces::Piece
Instance Method Details
#image ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/pieces/straight_left_wall.rb', line 4 def image if north? IMAGE.rotate(90) elsif east? IMAGE.rotate(180) elsif west? IMAGE elsif south? IMAGE.rotate(270) end end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/pieces/straight_left_wall.rb', line 16 def to_s 'Slw' end |