Преглед на файлове

Fix infinite loop in RandomWord

vintage
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()


Loading…
Отказ
Запис