mirror of
https://github.com/aquatix/alfagok.git
synced 2025-12-06 19:55:12 +01:00
Do not count rejected guesses, and show number of guesses done
This commit is contained in:
@@ -48,7 +48,6 @@ document.addEventListener('alpine:init', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
this.nrGuesses++;
|
||||
if (this.startTime === null) {
|
||||
console.log('Setting startTime to now');
|
||||
this.startTime = new Date();
|
||||
@@ -70,6 +69,7 @@ document.addEventListener('alpine:init', () => {
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.nrGuesses++;
|
||||
if (result.hint && result.hint === 'after') {
|
||||
this.guessesBefore.push(this.guessValue);
|
||||
this.guessesBefore.sort();
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
<div id="container" x-data="">
|
||||
|
||||
<a href="/" x-cloak class="title">alfagok</a> <span class="puzzleno">puzzel #<span x-text="$store.alfagok.gameID"></span> • <span id="nextgame"></span></span>
|
||||
<a href="/" x-cloak class="title">alfagok</a> <span class="puzzleno">puzzel #<span x-text="$store.alfagok.gameID"></span> • <span id="nextgame"></span> • <span x-text="$store.alfagok.nrGuesses"></span> gokken</span>
|
||||
|
||||
<div x-cloak class="instructions" x-show="$store.alfagok.guessesBefore.length === 0 && $store.alfagok.guessesAfter.length === 0">
|
||||
<p>Raad het woord van de dag. Elke gok geeft een hint over waar het woord zich in het alfabet bevindt.</p>
|
||||
|
||||
Reference in New Issue
Block a user