lib/chess/board.rb
# Given a color, sets @allow_en_passant to be 
# false for all pawns of the opposing enemy color
Given a color, sets @allow_en_passant to be
false for all pawns of the opposing enemy color
Given a color sets @allow_en_passant to be false for all pawns of the opposing enemy color
def disallow_all_en_passant(color)
      enemy_color = color == "black" ? "white" : "black"
      pawns_of_color = chess_pieces.select do |piece|
        piece.class == Pawn && piece.color == enemy_color
      end
      pawns_of_color.each { |pawn| pawn.allow_en_passant = false }
    end
def disallow_all_en_passant ( color ) enemy_color = color == "black" ? "white" : "black" pawns_of_color = chess_pieces . select do | piece | piece . class == Pawn && piece . color == enemy_color end pawns_of_color . each { | pawn | pawn . allow_en_passant = false } end
Given a color, sets @allow_en_passant to be
false for all pawns of the opposing enemy color
Given a color sets @allow_en_passant to be false for all pawns of the opposing enemy color
color
<not_specific>