Class: Rook
- Inherits:
-
SlidingPiece
- Object
- Piece
- SlidingPiece
- Rook
- Defined in:
- lib/ari_chess/pieces/rook.rb
Constant Summary collapse
- DELTAS =
[ [ 1, 0], [ 0, -1], [-1, 0], [ 0, 1], ]
Instance Attribute Summary
Attributes inherited from Piece
Instance Method Summary collapse
Methods inherited from SlidingPiece
Methods inherited from Piece
#deltas, #dup, #initialize, #move_into_check?, #moves, #next_pos, #update_piece, #valid_moves, #valid_pos?
Constructor Details
This class inherits a constructor from Piece
Instance Method Details
#to_s ⇒ Object
12 13 14 |
# File 'lib/ari_chess/pieces/rook.rb', line 12 def to_s color == :W ? "\u2656" : "\u265C" end |