lib/chess/board.rb
# Returns an array of any pieces that are checking the given color's king
Returns an array of any pieces that are checking the given color's king
Returns an array of any pieces that are checking the given color ' s king
def pieces_checking_king(color, king_location)
      enemy_pieces(color).select do |piece|
        valid_move?(piece.location[0], piece.location[1], 
                    king_location[0], king_location[1])
      end
    end
def pieces_checking_king ( color , king_location ) enemy_pieces ( color ) . select do | piece | valid_move? ( piece . location [ 0 ] , piece . location [ 1 ] , king_location [ 0 ] , king_location [ 1 ] ) end end
Returns an array of any pieces that are checking the given color's king
Returns an array of any pieces that are checking the given color ' s king
color
<not_specific>
king_location
<not_specific>