mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2024-11-23 20:45:06 +08:00
aaaa
This commit is contained in:
parent
49e89ad018
commit
769fd4b7cd
|
@ -164,7 +164,7 @@ function wrap_any(names, round) {
|
||||||
return [2 /*return*/, "\u8D62\u5BB6:|".concat(result.source_plr, "|")];
|
return [2 /*return*/, "\u8D62\u5BB6:|".concat(result.source_plr, "|")];
|
||||||
}
|
}
|
||||||
else if ('win_count' in result) {
|
else if ('win_count' in result) {
|
||||||
win_rate_1 = result.win_count / round;
|
win_rate_1 = result.win_count * 100 / round;
|
||||||
win_rate_str = win_rate_1.toFixed(4);
|
win_rate_str = win_rate_1.toFixed(4);
|
||||||
output_str_1 = "\u6700\u7EC8\u80DC\u7387:|".concat(win_rate_str, "|(").concat(round, "\u8F6E)");
|
output_str_1 = "\u6700\u7EC8\u80DC\u7387:|".concat(win_rate_str, "|(").concat(round, "\u8F6E)");
|
||||||
// 每 500 轮, 输出一次
|
// 每 500 轮, 输出一次
|
||||||
|
@ -176,7 +176,7 @@ function wrap_any(names, round) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
output_datas_1.forEach(function (data, index) {
|
output_datas_1.forEach(function (data, index) {
|
||||||
var win_rate = data.win_count / data.round;
|
var win_rate = data.win_count * 100 / data.round;
|
||||||
output_str_1 += "\n".concat(win_rate.toFixed(2), "%(").concat(data.round, ")");
|
output_str_1 += "\n".concat(win_rate.toFixed(2), "%(").concat(data.round, ")");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,7 @@ async function wrap_any(names: string, round: number): Promise<string> {
|
||||||
return `赢家:|${result.source_plr}|`;
|
return `赢家:|${result.source_plr}|`;
|
||||||
} else if ('win_count' in result) {
|
} else if ('win_count' in result) {
|
||||||
// 胜率结果
|
// 胜率结果
|
||||||
const win_rate = result.win_count / round;
|
const win_rate = result.win_count * 100 / round;
|
||||||
let win_rate_str = win_rate.toFixed(4);
|
let win_rate_str = win_rate.toFixed(4);
|
||||||
let output_str = `最终胜率:|${win_rate_str}|(${round}轮)`;
|
let output_str = `最终胜率:|${win_rate_str}|(${round}轮)`;
|
||||||
// 每 500 轮, 输出一次
|
// 每 500 轮, 输出一次
|
||||||
|
@ -159,7 +159,7 @@ async function wrap_any(names: string, round: number): Promise<string> {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
output_datas.forEach((data, index) => {
|
output_datas.forEach((data, index) => {
|
||||||
const win_rate = data.win_count / data.round;
|
const win_rate = data.win_count * 100 / data.round;
|
||||||
output_str += `\n${win_rate.toFixed(2)}%(${data.round})`;
|
output_str += `\n${win_rate.toFixed(2)}%(${data.round})`;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user