Commit 11e6e4fd authored by itecreator's avatar itecreator

update rule

parent c132bbc4
...@@ -13,8 +13,29 @@ let Utils = { ...@@ -13,8 +13,29 @@ let Utils = {
let eB = 1 / (1 + Math.pow(10, (rA - rB) / 400)) let eB = 1 / (1 + Math.pow(10, (rA - rB) / 400))
let rrA = rA + k * (sA - eA) let rrA = rA + k * (sA - eA)
// 加分高于16
if( (rrA - rA) > 16 ) {
rrA = rA + 16;
}
// 扣分低于8
if( (rA - rrA) < 8 ) {
rrA = rA - 8;
}
let rrB = rB + k * (sB - eB) let rrB = rB + k * (sB - eB)
// 加分高于16
if( (rrB - rB) > 16 ) {
rrB = rB + 16;
}
// 扣分低于8
if( (rB - rrB) < 8 ) {
rrB = rB - 8;
}
return { ptA: rrA, ptB: rrB } return { ptA: rrA, ptB: rrB }
}, },
getExpScore: function getExpScore(expA, expB, scoreA, scoreB) { getExpScore: function getExpScore(expA, expB, scoreA, scoreB) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment