diff --git a/squarenotsquare/src/screens/Game.js b/squarenotsquare/src/screens/Game.js index bd8de74..6ffe40d 100644 --- a/squarenotsquare/src/screens/Game.js +++ b/squarenotsquare/src/screens/Game.js @@ -79,9 +79,18 @@ function Game(props){ scrollDestination.current = newDestination; challengeState.current = challengeState.current + 1; setScrollOrigin(newOrigin); + + if (challengeState.current >= 20) { + completeChallenge(); + } } } + function completeChallenge(){ + clearInterval(localTimer.current); + setTimerState(4); + } + function generateSquare(pairIndex){ return ( - + {squareMemo} + + + + Finish + + diff --git a/squarenotsquare/src/screens/styles/AppStyles.js b/squarenotsquare/src/screens/styles/AppStyles.js index 3ae74b4..aeac431 100644 --- a/squarenotsquare/src/screens/styles/AppStyles.js +++ b/squarenotsquare/src/screens/styles/AppStyles.js @@ -80,7 +80,7 @@ export const styles = StyleSheet.create({ }, smallMargin: {margin: Metrics.margins.default}, - gameStart: {margin: Metrics.margins.gameStartMargin}, + gameView: {margin: Metrics.margins.gameStartMargin}, buttonMargin: { marginBottom: Metrics.margins.buttonMargin, marginTop: Metrics.margins.buttonMargin diff --git a/squarenotsquare/src/themes/Icons.js b/squarenotsquare/src/themes/Icons.js index 9f67027..91ddd10 100644 --- a/squarenotsquare/src/themes/Icons.js +++ b/squarenotsquare/src/themes/Icons.js @@ -3,7 +3,8 @@ class AppIcons { square: 'square', settings: 'cog-outline', toggleOn: 'toggle-switch-on', - toggleOfff: 'toggle-switch-off', + toggleOff: 'toggle-switch-off', + check: 'check' }; wrongShapes = {