修复一下这个问题

This commit is contained in:
shenjack 2024-05-10 12:24:21 +08:00
parent 01187cf8d9
commit 6fc85322cd
Signed by: shenjack
GPG Key ID: 7B1134A979775551

View File

@ -64,7 +64,7 @@ type ScoreCallback = (run_round: number, score: number) => boolean;
async function fight(names: string): Promise<FightResult> {
// 检查一下输入是否合法
// 比如里面有没有 !test!
if (names.startsWith("!test!")) {
if (names.indexOf("!test!") !== -1) {
throw new Error("你怎么在对战输入里加 !test!(恼)\n${names}");
}
return await md5_module.fight(names);