(rate int, score float64, exception float64, k int)
| 19 | } |
| 20 | |
| 21 | func calculateRate(rate int, score float64, exception float64, k int) int { |
| 22 | newRate := int(math.Round(float64(rate) + float64(k)*(score-exception))) |
| 23 | if newRate < 1 { |
| 24 | newRate = 1 |
| 25 | } |
| 26 | return newRate |
| 27 | } |
| 28 | |
| 29 | func getKFactor(rateA, rateB int) int { |
| 30 | if rateA > 2400 && rateB > 2400 { |