(rate int, opponentRate int)
| 15 | } |
| 16 | |
| 17 | func calculateException(rate int, opponentRate int) float64 { |
| 18 | return 1.0 / (1.0 + math.Pow(10.0, float64(opponentRate-rate)/400.0)) |
| 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))) |
no outgoing calls