|
@ -14,7 +14,7 @@ import Metrics from "../themes/Metrics"; |
|
|
function Game(props){ |
|
|
function Game(props){ |
|
|
|
|
|
|
|
|
const squareChallenge = useRef(genSquareChallenge()); |
|
|
const squareChallenge = useRef(genSquareChallenge()); |
|
|
const challengeState = useRef(0); |
|
|
const challengeState = useRef(-1); |
|
|
const squareMemo = useMemo(renderPairs, [challengeState.current]); |
|
|
const squareMemo = useMemo(renderPairs, [challengeState.current]); |
|
|
const [timerState, setTimerState] = useState(0); |
|
|
const [timerState, setTimerState] = useState(0); |
|
|
const localTimer = useRef(null); |
|
|
const localTimer = useRef(null); |
|
@ -41,6 +41,7 @@ function Game(props){ |
|
|
setHeaderColor(styles.red); |
|
|
setHeaderColor(styles.red); |
|
|
setHeaderTextColor(styles.lightText); |
|
|
setHeaderTextColor(styles.lightText); |
|
|
setHeaderText('Go!'); |
|
|
setHeaderText('Go!'); |
|
|
|
|
|
challengeState.current = 0; |
|
|
setTimerState(2); |
|
|
setTimerState(2); |
|
|
}, 1000); |
|
|
}, 1000); |
|
|
break; |
|
|
break; |
|
|