better UX on wrong word
This commit is contained in:
parent
4bc83730ea
commit
2387b87908
|
@ -81,7 +81,7 @@
|
||||||
word.length > 3 && word.length < 11
|
word.length > 3 && word.length < 11
|
||||||
) {
|
) {
|
||||||
not_a_word = true;
|
not_a_word = true;
|
||||||
setTimeout(() => {not_a_word = false}, 1000);
|
setTimeout(() => {not_a_word = false}, 500);
|
||||||
return updateState();
|
return updateState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -170,7 +170,6 @@
|
||||||
document.onkeydown = e => {
|
document.onkeydown = e => {
|
||||||
if (game_creator) return updateState();
|
if (game_creator) return updateState();
|
||||||
if (endgame) return updateState();
|
if (endgame) return updateState();
|
||||||
if (not_a_word) return updateState();
|
|
||||||
|
|
||||||
if (e.key == 'Backspace') {
|
if (e.key == 'Backspace') {
|
||||||
if (word_position == 0) return updateState();
|
if (word_position == 0) return updateState();
|
||||||
|
|
Loading…
Reference in New Issue