def to_s
      s = ''
      TAGS.each do |t|
        tag = instance_variable_get("@#{t}")
        s << "[#{t.capitalize} \"#{tag}\"]\n"
      end
      s << "\n"
      m = ''
      @moves.each_with_index do |move, i|
        m << "#{i/2+1}. " if i % 2 == 0
        m << "#{move} "
      end
      m << @result unless @result.nil?
      s << m.gsub(/(.{1,78})(?: +|$)\n?|(.{78})/, "\\1\\2\n")
    end
def to_s
      s = ''
      TAGS.each do |t|
        tag = instance_variable_get("@#{t}")
        s << "[#{t.capitalize} \"#{tag}\"]\n"
      end
      s << "\n"
      m = ''
      @moves.each_with_index do |move, i|
        m << "#{i/2+1}. " if i % 2 == 0
        m << "#{move} "
      end
      m << @result unless @result.nil?
      s << m.gsub(/(.{1,78})(?: +|$)\n?|(.{78})/, "\\1\\2\n")
    end
PGN to string.