Class: Rchess::Paths::Queen

Inherits:
Base
  • Object
show all
Defined in:
lib/rchess/paths/queen.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/queen.rb', line 4

def paths
  [Bishop.new({coord: @coord, board: @board}), Rook.new({coord: @coord, board: @board})].flatten(1)
end