File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
vanilla/guess-the-word/src/events/handlers Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11import { setIsShowingCorrectWord } from "@/state/correct-word" ;
22import { setIsAlertInitialized } from "@/state/alert" ;
3+ import { InsaneDifficulty } from "@/utils/difficulty/insane" ;
34import { showCorrectWord } from "@/ui/word" ;
45import { $hints , $hintsContent } from "@/ui/hints/elements" ;
56import { $randomWord , $reset } from "@/ui/actions" ;
@@ -20,6 +21,11 @@ export function handleGameOver({ $currentField }) {
2021 setIsShowingCorrectWord ( false ) ;
2122 } ) ;
2223
24+ if ( InsaneDifficulty . isApplied ( ) )
25+ import ( "@/ui/insane-countdown-bar" ) . then ( ( { InsaneCountdownBar } ) =>
26+ InsaneCountdownBar . disable ( ) ,
27+ ) ;
28+
2329 $hints . classList . add ( CLASSES . HIDDEN ) ;
2430 $hintsContent . classList . add ( CLASSES . HIDDEN ) ;
2531
Original file line number Diff line number Diff line change @@ -33,11 +33,6 @@ export function handleLetterInput($currentField) {
3333 if ( implementsMaxResets ( ) && gameResets === maxResets ) {
3434 handleLetterMistake ( { $currentLetter, enteredLetter, tries } ) ;
3535 handleGameOver ( { $currentField } ) ;
36- // TODO: move to handleGameOver()
37- if ( InsaneDifficulty . isApplied ( ) )
38- import ( "@/ui/insane-countdown-bar" ) . then ( ( { InsaneCountdownBar } ) =>
39- InsaneCountdownBar . disable ( ) ,
40- ) ;
4136 return ;
4237 }
4338
You can’t perform that action at this time.
0 commit comments