JavaScript implementation of TrueSkill player ranking