css variables, change max_guesses behaviour in wordle
Build / Build-image (push) Successful in 1m19s
Build / Build-image (push) Successful in 1m19s
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<Modal v-model:open="open">
|
||||
<h1>Wordle for the tired</h1>
|
||||
<h1>Wordle for word {{ index }}</h1>
|
||||
<br>
|
||||
<div class="flex-container-a gap-1.5">
|
||||
<template v-for="i in max_guesses">
|
||||
@@ -18,9 +18,13 @@
|
||||
|
||||
<WordleRow v-if="guesses.length < i" :length="correct.length"/>
|
||||
</template>
|
||||
|
||||
<template v-if="guesses[guesses.length-1].toString().replace(/\,/gi, '') == correct">
|
||||
You guessed word #{{ index }}! It was '{{ correct }}'
|
||||
</template>
|
||||
</div>
|
||||
|
||||
<UButton @click="onsubmit" class="m-1.5">
|
||||
<UButton @click="onsubmit" class="m-1.5" v-if="guesses[guesses.length-1].toString().replace(/\,/gi, '') != correct">
|
||||
Submit
|
||||
</UButton>
|
||||
</Modal>
|
||||
@@ -54,6 +58,7 @@
|
||||
},
|
||||
mounted() {
|
||||
this.guesses = JSON.parse(localStorage.getItem('guesses-' + this.index) || '[""]');
|
||||
this.max_guesses = this.correct.length > 5 ? this.correct.length : 6
|
||||
},
|
||||
methods: {
|
||||
onsubmit () {
|
||||
|
||||
Reference in New Issue
Block a user