diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e8eea8..d0ebc9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 2.0.2 # Build 2 [2021-02-25] - ➕ - Added game statistics +- ➕ - Added end game scene - ✔️ - Fix keyboard fize on big screen - ♻️ - JS code replace `var` by `let` diff --git a/TODO.md b/TODO.md index 30f482c..e863699 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,5 @@ -[+] Keyboard fit -[ ] Game Statistics -[ ] Restart scene [ ] Android manifest +[+] Keyboard fit +[+] Game Statistics +[+] Restart scene [+] iOS web app diff --git a/js/game.js b/js/game.js index adaaa64..d69d71f 100644 --- a/js/game.js +++ b/js/game.js @@ -67,9 +67,13 @@ function letterClick(letter) if (gameAnswered.split('').indexOf('-') == -1) { - alert('You Win'); updateStats('stWinWords'); - document.location.reload(true); + + document.querySelector('#keyboard').innerHTML = '\ + \ +

Your winner!!

\ + '; } } @@ -78,9 +82,13 @@ function wrongLetter() { if (lives <= 0) { - alert('You dead'); updateStats('stTotalGames'); - document.location.reload(true); + + document.querySelector('#keyboard').innerHTML = '\ + \ +

Your lose!!

\ + '; } lives -= 1;