Skip to content

Commit

Permalink
feat(WordChoice.vue): auto shuffle
Browse files Browse the repository at this point in the history
  • Loading branch information
darlanalves authored Apr 8, 2024
1 parent 399d6ff commit a8ede1d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions components/WordChoice.vue
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,11 @@ let timer;
function next() {
state.value = '';
if (index.value > 0) {
index.value--;
if (index.value < list.value.length) {
index.value++;
} else {
index.value = list.value.length - 1;
shuffle();
index.value = 0;
}
}
Expand Down

0 comments on commit a8ede1d

Please sign in to comment.