Kaynağa Gözat

Fix infinite loop in RandomWord

master
Fen Dweller 5 yıl önce
ebeveyn
işleme
d7e6a54811
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. +1
    -1
      src/game/language.ts

+ 1
- 1
src/game/language.ts Dosyayı Görüntüle

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


Yükleniyor…
İptal
Kaydet