Class: BlackRook
- Inherits:
-
BlackPiece
- Object
- EmptySpace
- Piece
- BlackPiece
- BlackRook
- Includes:
- Rook
- Defined in:
- lib/rook.rb
Instance Attribute Summary collapse
-
#start ⇒ Object
readonly
Returns the value of attribute start.
Attributes inherited from EmptySpace
Instance Method Summary collapse
-
#initialize(x, y) ⇒ BlackRook
constructor
A new instance of BlackRook.
- #to_s ⇒ Object
Methods included from Rook
Methods included from Moves
#diagonal, #horizontal, #move, #vertical
Methods inherited from BlackPiece
Methods inherited from EmptySpace
#empty?, #enemy_of?, #friend_of?, #place_on, #remove_from, #to_coord
Constructor Details
#initialize(x, y) ⇒ BlackRook
Returns a new instance of BlackRook.
47 48 49 50 |
# File 'lib/rook.rb', line 47 def initialize(x,y) super @start = true end |
Instance Attribute Details
#start ⇒ Object (readonly)
Returns the value of attribute start.
46 47 48 |
# File 'lib/rook.rb', line 46 def start @start end |
Instance Method Details
#to_s ⇒ Object
52 53 54 |
# File 'lib/rook.rb', line 52 def to_s "BR" end |