def where(hash)
      res = hash.inject(squares) do |memo, (attribute, value)|
        memo.select { |square| square.attribute_match?(attribute, value) }
      end
      self.class.new(squares: res)
    end
def where(hash)
      res = hash.inject(squares) do |memo, (attribute, value)|
        memo.select { |square| square.attribute_match?(attribute, value) }
      end
      self.class.new(squares: res)
    end
Filter the squares with a hash of attribute and matching values.

 @param [Hash] hash
   attributes to query for.

 @return [SquareSet]

 ==== Example:
   # Find all squares where piece is nil
   square_set.where(piece: nil)