This commit is contained in:
@@ -23,6 +23,7 @@ import Wordle from '../components/Wordle.vue';
|
||||
maxGuesses: 10,
|
||||
correct: false,
|
||||
no_tla: false,
|
||||
wordle_open: [false, false, false]
|
||||
};
|
||||
},
|
||||
|
||||
@@ -38,6 +39,7 @@ import Wordle from '../components/Wordle.vue';
|
||||
this.tla = response.data.tla;
|
||||
this.context = response.data.context;
|
||||
this.correct = response.data.correct;
|
||||
this.correct_words = response.data.tla_array;
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -54,6 +56,7 @@ import Wordle from '../components/Wordle.vue';
|
||||
this.guesses = response.data.guesses;
|
||||
this.guess = '';
|
||||
this.words = [];
|
||||
this.correct_words = response.data.tla_array;
|
||||
|
||||
let current_guess = response.data.guesses[response.data.guesses.length-1]
|
||||
if (Number(current_guess[3]) + Number(current_guess[4]) + Number(current_guess[5]) == 12) {
|
||||
@@ -93,13 +96,14 @@ import Wordle from '../components/Wordle.vue';
|
||||
<template v-for="guess in guesses" v-if="guesses.length>1">
|
||||
<div class="flex-container">
|
||||
<template v-for="i in 3">
|
||||
<GuessWord :correctness="Number(guess[i+2])" :correct="correct_words[i-1]">
|
||||
<GuessWord @pressed_wordle="wordle_open[i-1] = true" :correctness="Number(guess[i+2])" :index="i-1">
|
||||
{{ guess[i-1] }}
|
||||
</GuessWord>
|
||||
|
||||
<Wordle v-model:open="wordle_open[i-1]" :correct="correct_words[i-1]"/>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template v-if="guesses.length < maxGuesses && !correct && !no_tla">
|
||||
<div class="flex-container" v-if="guess.length > 0">
|
||||
@@ -141,7 +145,7 @@ import Wordle from '../components/Wordle.vue';
|
||||
<UButton to="/suggestion" color="neutral" variant="subtle">
|
||||
Suggest a TLA!
|
||||
</UButton>
|
||||
|
||||
|
||||
<Modal v-model:open="victory">
|
||||
<h1>Congratulations!</h1>
|
||||
Todays TLA was: {{ tla }}
|
||||
@@ -154,8 +158,6 @@ import Wordle from '../components/Wordle.vue';
|
||||
<h3>The context of todays TLA:</h3>
|
||||
{{ context }}
|
||||
</Modal>
|
||||
<Wordle correct="sadf"/>
|
||||
|
||||
</template>
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user