class Bchess::Rook
Constants
- ROOK_REACH
Attributes
moved[RW]
Public Instance Methods
can_move_to_field?(dcolumn, drow)
click to toggle source
Calls superclass method
Bchess::Piece#can_move_to_field?
# File lib/bchess/rook.rb, line 21 def can_move_to_field?(dcolumn, drow) super && by_line(dcolumn, drow, ROOK_REACH) end
initiialize(*args)
click to toggle source
Calls superclass method
# File lib/bchess/rook.rb, line 7 def initiialize(*args) super(args) @moved = false end
move(dcolumn, drow)
click to toggle source
Calls superclass method
Bchess::Piece#move
# File lib/bchess/rook.rb, line 16 def move(dcolumn, drow) super(dcolumn, drow) @moved = true end
name()
click to toggle source
# File lib/bchess/rook.rb, line 12 def name 'R' end