浏览代码

Fix infinite loop in RandomWord

master
Fen Dweller 5 年前
父节点
当前提交
d7e6a54811
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      src/game/language.ts

+ 1
- 1
src/game/language.ts 查看文件

@@ -226,7 +226,7 @@ export class RandomWord extends Word {

do {
choice = Math.floor(Math.random() * this.choices.length)
} while (choice === this.history.last)
} while (choice === this.history.last && this.choices.length > 1)

this.history.last = choice
return this.choices[choice].configure(this.opt).toString()


正在加载...
取消
保存