Class: SteppingPiece
- Defined in:
- lib/ari_chess/pieces/super/stepping_piece.rb
Instance Attribute Summary
Attributes inherited from Piece
Instance Method Summary collapse
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
#potential_moves(delta) ⇒ Object
2 3 4 5 6 7 |
# File 'lib/ari_chess/pieces/super/stepping_piece.rb', line 2 def potential_moves(delta) move = next_pos(pos, delta) return [move] if valid_pos?(move) [] end |