// elo.js function calculateElo(currentRating, opponentRating, actualScore, kFactor = 32) { const expectedScore = 1 / (1 + Math.pow(10, (opponentRating - currentRating) / 400)); const newRating = currentRating + kFactor * (actualScore - expectedScore); return newRating; } module.exports = { calculateElo, };