Class: Rchess::Paths::Pawn

Inherits:
Base
  • Object
show all
Defined in:
lib/rchess/paths/pawn.rb

Instance Attribute Summary

Attributes inherited from Base

#board, #coord

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

#pathsObject



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