update is word in word list logic to include new valid guesses

This commit is contained in:
Hannah Park 2022-01-14 15:35:20 -05:00
parent 519b67e660
commit 55b3da3d32

View file

@ -1,7 +1,11 @@
import { WORDS } from "../constants/wordlist";
import { VALIDGUESSES } from "../constants/validGuesses";
export const isWordInWordList = (word: string) => {
return WORDS.includes(word.toLowerCase());
return (
WORDS.includes(word.toLowerCase()) ||
VALIDGUESSES.includes(word.toLowerCase())
);
};
export const isWinningWord = (word: string) => {