Skip to content

Commit 3c37154

Browse files
committed
fix(jsbattle-server): 🐛 fix league cut off defaults
1 parent ad57f7d commit 3c37154

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

packages/jsbattle-docs/docs/configuration.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ List of all settings of JsBattle:
158158
// 1. They completed `cutOffFightCount` of fights
159159
// 2. Their win ratio is below `cutOffWinRatio`
160160
"cutOffFightCount": 100,
161-
"cutOffWinRatio": 0.05,
161+
"cutOffWinRatio": 0.05
162162

163163
},
164164

packages/jsbattle-server/app/lib/serviceConfig.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ config.data = {
3535
"obfuscate": true,
3636
"historyDuration": 3*24*60*60*1000,
3737
"cutOffFightCount": 100,
38-
"cutOffWinRatio:": 0.05
38+
"cutOffWinRatio": 0.05
3939
},
4040
"ubdPlayer": {
4141
"enabled": true,

packages/jsbattle-server/app/runner-webpage-dev-proxy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ let config = {
3838
"scheduleInterval": 500,
3939
"timeLimit": 10000,
4040
"cutOffFightCount": 100,
41-
"cutOffWinRatio:": 0.05,
41+
"cutOffWinRatio": 0.05,
4242
},
4343
"ubdPlayer": {
4444
"enabled": true,

packages/jsbattle-server/app/services/league/actions/updateRank.js

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module.exports = async function(ctx) {
2929
score: Math.round(newScore)
3030
}
3131

32+
console.log(this.settings.cutOffFightCount, this.settings.cutOffWinRatio);
3233
if(
3334
newEntity.fights_total > this.settings.cutOffFightCount &&
3435
newEntity.fights_win < this.settings.cutOffWinRatio * newEntity.fights_total

0 commit comments

Comments
 (0)