add green|yellow|unfit letters to GameState
This commit is contained in:
parent
410ff840b0
commit
9039499ad2
|
@ -24,6 +24,10 @@
|
||||||
let wins = false;
|
let wins = false;
|
||||||
let endgame = false;
|
let endgame = false;
|
||||||
|
|
||||||
|
let green_letters: string[] = [];
|
||||||
|
let yellow_letters: string[] = [];
|
||||||
|
let unfit_letters: string[] = [];
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setGameState({
|
setGameState({
|
||||||
word,
|
word,
|
||||||
|
@ -32,7 +36,10 @@
|
||||||
current_guess,
|
current_guess,
|
||||||
word_position,
|
word_position,
|
||||||
wins,
|
wins,
|
||||||
endgame
|
endgame,
|
||||||
|
green_letters,
|
||||||
|
yellow_letters,
|
||||||
|
unfit_letters
|
||||||
});
|
});
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
|
@ -52,10 +59,6 @@
|
||||||
let not_a_word = false;
|
let not_a_word = false;
|
||||||
let game_creator = false;
|
let game_creator = false;
|
||||||
|
|
||||||
let green_letters: string[] = [];
|
|
||||||
let yellow_letters: string[] = [];
|
|
||||||
let unfit_letters: string[] = [];
|
|
||||||
|
|
||||||
(
|
(
|
||||||
function() {
|
function() {
|
||||||
const urlprops = new URLSearchParams(window.location.search);
|
const urlprops = new URLSearchParams(window.location.search);
|
||||||
|
|
|
@ -15,6 +15,9 @@ export class GameState {
|
||||||
word_position?: number;
|
word_position?: number;
|
||||||
wins?: boolean;
|
wins?: boolean;
|
||||||
endgame?: boolean;
|
endgame?: boolean;
|
||||||
|
green_letters?: string[];
|
||||||
|
yellow_letters?: string[];
|
||||||
|
unfit_letters?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class WordleLibrary {
|
export class WordleLibrary {
|
||||||
|
|
Loading…
Reference in New Issue