mirror of https://github.com/espruino/BangleApps
Merge pull request #1795 from nemesisridiculii/master
[Bordle] Fix bug in valid word detectionpull/1806/head^2
commit
b8b69cc854
|
@ -1,2 +1,3 @@
|
|||
0.01: New App
|
||||
0.02: app keeps track of statistics now
|
||||
0.03: Fix bug in valid word detection
|
||||
|
|
|
@ -110,7 +110,12 @@ class Wordle {
|
|||
}
|
||||
}
|
||||
addGuess(w) {
|
||||
if ((this.words.indexOf(w.toLowerCase())%5)!=0) {
|
||||
let idx = -1;
|
||||
do{
|
||||
idx = this.words.indexOf(w.toLowerCase(), idx+1);
|
||||
}
|
||||
while(idx !== -1 && idx%5 !== 0);
|
||||
if(idx%5 !== 0) {
|
||||
E.showAlert(w+"\nis not a word", "Invalid word").then(function() {
|
||||
layout = getKeyLayout("");
|
||||
wordle.render(true);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "Bordle",
|
||||
"shortName":"Bordle",
|
||||
"icon": "app.png",
|
||||
"version":"0.02",
|
||||
"version":"0.03",
|
||||
"description": "Bangle version of a popular word search game",
|
||||
"supports" : ["BANGLEJS2"],
|
||||
"readme": "README.md",
|
||||
|
|
Loading…
Reference in New Issue