Class: Rchess::Paths::Pawn
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#destinations, #initialize, #srcBox, #srcDirection, threaten_destinations_from_coord
Constructor Details
This class inherits a constructor from Rchess::Paths::Base
Instance Method Details
#paths ⇒ Object
4 5 6 |
# File 'lib/rchess/paths/pawn.rb', line 4 def paths [move_forward, take_piece, move_2_if_first_move].select{|path| !path.empty?} end |