Commit 25a23735 authored by Tt's avatar Tt

调整匹配时长和AI能力

parent ff8b98ce
......@@ -49,12 +49,21 @@ export class AI {
//调试加速 2 Math.random() * 3 + 4
await asyncDelay(Math.random() * 3 + 4);
const idx = this.getNextRightIdx();
this.networkHelper.sendFrame({
type: "right",
idx: idx,
uuid: this.playerData.uuid,
color: this.playerData.color,
});
if (Math.random() < 0.8) {
this.networkHelper.sendFrame({
type: "right",
idx: idx,
uuid: this.playerData.uuid,
color: this.playerData.color,
});
} else {
this.networkHelper.sendFrame({
type: "wrong",
uuid: this.playerData.uuid,
color: this.playerData.color,
});
}
}
}
}
......
......@@ -114,7 +114,7 @@ export class GameServer {
this.addPlayer(playerInfo);
}
//TODO:调试加速
}, 1000)//RandomInt(10000, 15000)
}, 10000)//RandomInt(10000, 15000)
);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment