Class: WhiteRook
- Inherits:
-
WhitePiece
- Object
- EmptySpace
- Piece
- WhitePiece
- WhiteRook
- 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) ⇒ WhiteRook
constructor
A new instance of WhiteRook.
- #to_s ⇒ Object
Methods included from Rook
Methods included from Moves
#diagonal, #horizontal, #move, #vertical
Methods inherited from WhitePiece
Methods inherited from EmptySpace
#empty?, #enemy_of?, #friend_of?, #place_on, #remove_from, #to_coord
Constructor Details
#initialize(x, y) ⇒ WhiteRook
Returns a new instance of WhiteRook.
32 33 34 35 |
# File 'lib/rook.rb', line 32 def initialize(x,y) super @start = true end |
Instance Attribute Details
#start ⇒ Object (readonly)
Returns the value of attribute start.
31 32 33 |
# File 'lib/rook.rb', line 31 def start @start end |
Instance Method Details
#to_s ⇒ Object
37 38 39 |
# File 'lib/rook.rb', line 37 def to_s "WR" end |