class ActiveGenie::Ranking::EloRound

def calculate_new_elo(player_rating, opponent_rating, score)

INFO: Read more about the Elo rating system on https://en.wikipedia.org/wiki/Elo_rating_system
def calculate_new_elo(player_rating, opponent_rating, score)
  expected_score = 1.0 / (1.0 + 10.0 ** ((opponent_rating - player_rating) / 400.0))
  
  player_rating + (K * (score - expected_score)).round
end