This commit is contained in:
shenjack 2024-09-24 23:58:26 +08:00
parent 3104cacefd
commit 5883c95d82
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 2 additions and 2 deletions

View File

@ -231,7 +231,7 @@ function main() {
fs = require("fs");
path = require("path");
process = require("process");
if (!("fight" in process.argv)) return [3 /*break*/, 2];
if (!(process.argv.length > 2 && process.argv[2] === "fight")) return [3 /*break*/, 2];
names_1 = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8");
return [4 /*yield*/, fight_only(names_1)];
case 1:

View File

@ -201,7 +201,7 @@ async function main() {
const process = require("process");
// 读取 cli
// 有 fight 参数就开启 fight_only模式
if ("fight" in process.argv) {
if (process.argv.length > 2 && process.argv[2] === "fight") {
const names = fs.readFileSync(path.resolve(__dirname, "input.txt"), "utf-8");
await fight_only(names);
return;