File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 11import { Theme , toast } from "react-toastify" ;
22
3- import words from "./words" ;
3+ import game_words from "./game_words" ;
4+ import dictionary from "./existing_words" ;
45
56export const getRandomWord = ( ) =>
6- words [ Math . floor ( Math . random ( ) * words . length ) ] ;
7+ game_words [ Math . floor ( Math . random ( ) * game_words . length ) ] ;
78
89export const testGuess = ( guess : string , word : string ) => {
910 const types : string [ ] = [ ] ;
@@ -21,7 +22,7 @@ export const testGuess = (guess: string, word: string) => {
2122} ;
2223
2324export const isValid = ( guess : string ) => {
24- return words . findIndex ( ( item ) => guess . toLowerCase ( ) === item ) !== - 1 ;
25+ return dictionary . findIndex ( ( item ) => guess . toLowerCase ( ) === item ) !== - 1 ;
2526} ;
2627
2728export const customToast = ( value : string , autoClose : number | false = 500 ) => {
You can’t perform that action at this time.
0 commit comments