app/models/player.rb
# In BFA it was changed so titles were earned during
# the season instead of after it ended except for R1
# so we need to handle a player earning a Season X
# title before being awareded their Season X - 1 R1
In BFA it was changed so titles were earned during
the season instead of after it ended except for R1
so we need to handle a player earning a Season X
title before being awareded their Season X - 1 R1
In BFA it was changed so titles were earned during the season instead of after it ended except for R1 so we need to handle a player earning a Season X title before being awareded their Season X - 1 R1
def cleanup_r1 titles
    return titles if titles.length < 2
    for i in 1..titles.length-1 do
      swap_if_needed(titles, i-1, i)
    end
    return titles
  end
def cleanup_r1 titles return titles if titles . length < 2 for i in 1 .. titles . length - 1 do swap_if_needed ( titles , i - 1 , i ) end return titles end
In BFA it was changed so titles were earned during
the season instead of after it ended except for R1
so we need to handle a player earning a Season X
title before being awareded their Season X - 1 R1
In BFA it was changed so titles were earned during the season instead of after it ended except for R1 so we need to handle a player earning a Season X title before being awareded their Season X - 1 R1
titles
<not_specific>