out limit!
This commit is contained in:
parent
f83f7ceb0f
commit
4dfb17533d
@ -151,6 +151,7 @@ function run_any(names, round) {
|
||||
});
|
||||
});
|
||||
}
|
||||
var out_limit = 1000;
|
||||
function wrap_any(names, round) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result, win_rate_1, win_rate_str, output_str_1, output_datas_1, win_rate_2, output_str_2, output_datas_2;
|
||||
@ -168,10 +169,10 @@ function wrap_any(names, round) {
|
||||
win_rate_str = win_rate_1.toFixed(4);
|
||||
output_str_1 = "\u6700\u7EC8\u80DC\u7387:|".concat(win_rate_str, "%|(").concat(round, "\u8F6E)");
|
||||
// 每 500 轮, 输出一次
|
||||
if (round > 500) {
|
||||
if (round > out_limit) {
|
||||
output_datas_1 = [];
|
||||
result.raw_data.forEach(function (data, index) {
|
||||
if (data.round % 500 === 0) {
|
||||
if (data.round % out_limit === 0) {
|
||||
output_datas_1.push(data);
|
||||
}
|
||||
});
|
||||
@ -186,10 +187,10 @@ function wrap_any(names, round) {
|
||||
else {
|
||||
win_rate_2 = (result.score * 10000 / round).toFixed(2);
|
||||
output_str_2 = "\u5206\u6570:|".concat(win_rate_2, "|(").concat(round, "\u8F6E)");
|
||||
if (round > 500) {
|
||||
if (round > out_limit) {
|
||||
output_datas_2 = [];
|
||||
result.raw_data.forEach(function (data, index) {
|
||||
if (data.round % 500 === 0) {
|
||||
if (data.round % out_limit === 0) {
|
||||
output_datas_2.push(data);
|
||||
}
|
||||
});
|
||||
|
@ -139,6 +139,8 @@ async function run_any(names: string, round: number): Promise<FightResult | WinR
|
||||
return await md5_module.run_any(names, round);
|
||||
}
|
||||
|
||||
const out_limit: number = 1000;
|
||||
|
||||
async function wrap_any(names: string, round: number): Promise<string> {
|
||||
const result = await run_any(names, round);
|
||||
if ('message' in result) {
|
||||
@ -150,11 +152,11 @@ async function wrap_any(names: string, round: number): Promise<string> {
|
||||
let win_rate_str = win_rate.toFixed(4);
|
||||
let output_str = `最终胜率:|${win_rate_str}%|(${round}轮)`;
|
||||
// 每 500 轮, 输出一次
|
||||
if (round > 500) {
|
||||
if (round > out_limit) {
|
||||
// 把所有要找的数据拿出来
|
||||
let output_datas: WinRate[] = [];
|
||||
result.raw_data.forEach((data, index) => {
|
||||
if (data.round % 500 === 0) {
|
||||
if (data.round % out_limit === 0) {
|
||||
output_datas.push(data);
|
||||
}
|
||||
});
|
||||
@ -169,11 +171,11 @@ async function wrap_any(names: string, round: number): Promise<string> {
|
||||
// 分数结果其实还是个胜率, 不过需要 * 100
|
||||
const win_rate = (result.score * 10000 / round).toFixed(2);
|
||||
let output_str = `分数:|${win_rate}|(${round}轮)`;
|
||||
if (round > 500) {
|
||||
if (round > out_limit) {
|
||||
// 把所有要找的数据拿出来
|
||||
let output_datas: Score[] = [];
|
||||
result.raw_data.forEach((data, index) => {
|
||||
if (data.round % 500 === 0) {
|
||||
if (data.round % out_limit === 0) {
|
||||
output_datas.push(data);
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user