lib/chess/board.rb
# Returns an array of all the chess pieces currently on the board
Returns an array of all the chess pieces currently on the board
Returns an array of all the chess pieces currently on the board
def chess_pieces
      pieces = @state.map do |row|
        row.select { |piece| piece != nil }
      end.flatten
    end
def chess_pieces pieces = @state . map do | row | row . select { | piece | piece != nil } end . flatten end
Returns an array of all the chess pieces currently on the board
Returns an array of all the chess pieces currently on the board