Commit 2a2dee47 authored by Neranga K.T.'s avatar Neranga K.T.

.

parent cee1bb44
...@@ -15,7 +15,7 @@ const styles = StyleSheet.create({ ...@@ -15,7 +15,7 @@ const styles = StyleSheet.create({
width: '100%', width: '100%',
height: 90, height: 90,
paddingTop: 36, paddingTop: 36,
backgroundColor: Colors.primary, backgroundColor: '#5fcf93',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center' alignItems: 'center'
}, },
......
export default { export default {
elementry: 2, elementry: 5,
medium: 5, medium: 5,
advance: 2 advance: 3
} }
\ No newline at end of file
...@@ -192,7 +192,7 @@ const AppRouter = () => { ...@@ -192,7 +192,7 @@ const AppRouter = () => {
options={{ options={{
title: 'Memory Games', title: 'Memory Games',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary} headerStyle: {backgroundColor: '#5fcf93'}
}} }}
/> />
<Stack.Screen <Stack.Screen
...@@ -202,7 +202,7 @@ const AppRouter = () => { ...@@ -202,7 +202,7 @@ const AppRouter = () => {
headerShown: true, headerShown: true,
title: 'Game Start', title: 'Game Start',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary}, headerStyle: {backgroundColor: '#5fcf93'},
}} }}
/> />
<Stack.Screen <Stack.Screen
...@@ -272,7 +272,7 @@ const AppRouter = () => { ...@@ -272,7 +272,7 @@ const AppRouter = () => {
headerShown: true, headerShown: true,
title: 'Game Over', title: 'Game Over',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary}, headerStyle: {backgroundColor: '#5fcf93'},
}} }}
/> />
<Stack.Screen <Stack.Screen
...@@ -282,7 +282,7 @@ const AppRouter = () => { ...@@ -282,7 +282,7 @@ const AppRouter = () => {
headerShown: true, headerShown: true,
title: 'Results', title: 'Results',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary}, headerStyle: {backgroundColor: '#5fcf93'},
}} }}
/> />
<Stack.Screen <Stack.Screen
...@@ -292,7 +292,7 @@ const AppRouter = () => { ...@@ -292,7 +292,7 @@ const AppRouter = () => {
headerShown: true, headerShown: true,
title: 'Levels', title: 'Levels',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary}, headerStyle: {backgroundColor: '#5fcf93'},
}} }}
/> />
<Stack.Screen <Stack.Screen
...@@ -302,7 +302,7 @@ const AppRouter = () => { ...@@ -302,7 +302,7 @@ const AppRouter = () => {
headerShown: true, headerShown: true,
title: 'Medium Level', title: 'Medium Level',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary}, headerStyle: {backgroundColor: '#5fcf93'},
}} }}
/> />
<Stack.Screen <Stack.Screen
...@@ -312,7 +312,7 @@ const AppRouter = () => { ...@@ -312,7 +312,7 @@ const AppRouter = () => {
headerShown: true, headerShown: true,
title: 'Advance Level', title: 'Advance Level',
headerTintColor: 'white', headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary}, headerStyle: {backgroundColor: '#5fcf93'},
}} }}
/> />
<Stack.Screen <Stack.Screen
......
...@@ -19,19 +19,20 @@ const GameLevel = ({navigation}) => { ...@@ -19,19 +19,20 @@ const GameLevel = ({navigation}) => {
> >
<View style={styles.centeredView}> <View style={styles.centeredView}>
<View style={styles.modalView}> <View style={styles.modalView}>
<Text style={styles.modalText}>Please select matching images</Text> <Text style={styles.modalText}>Select matching images, 5 seconds will be given for each!</Text>
<Text style={styles.modalTextBold}>Are you ready?</Text>
<View style={{ flexDirection: 'row' }} > <View style={{ flexDirection: 'row' }} >
<Pressable <Pressable
style={[styles.button, styles.buttonClose]} style={[styles.button, styles.buttonClose]}
onPress={() => {setModalVisible(!modalVisible); navigation.navigate('GameScreenOne'); }} onPress={() => {setModalVisible(!modalVisible); navigation.navigate('GameScreenOne'); }}
> >
<Text style={styles.textStyle}>Start</Text> <Text style={styles.textStyle}>Yes</Text>
</Pressable> </Pressable>
<Pressable <Pressable
style={[styles.button, styles.buttonClose]} style={[styles.button, styles.buttonClose]}
onPress={() => {setModalVisible(!modalVisible)}} onPress={() => {setModalVisible(!modalVisible)}}
> >
<Text style={styles.textStyle}>Cancel</Text> <Text style={styles.textStyle}>No</Text>
</Pressable> </Pressable>
</View> </View>
</View> </View>
...@@ -49,19 +50,20 @@ const GameLevel = ({navigation}) => { ...@@ -49,19 +50,20 @@ const GameLevel = ({navigation}) => {
> >
<View style={styles.centeredView}> <View style={styles.centeredView}>
<View style={styles.modalView}> <View style={styles.modalView}>
<Text style={styles.modalText}>Please select matching images</Text> <Text style={styles.modalText}>Select matching images, 5 seconds will be given for each!</Text>
<Text style={styles.modalTextBold}>Are you ready?</Text>
<View style={{ flexDirection: 'row' }} > <View style={{ flexDirection: 'row' }} >
<Pressable <Pressable
style={[styles.button, styles.buttonClose]} style={[styles.button, styles.buttonClose]}
onPress={() => {setModalVisible(!mediumModalVisible); navigation.navigate('MediumGameScreenOne'); }} onPress={() => {setModalVisible(!mediumModalVisible); navigation.navigate('MediumGameScreenOne'); }}
> >
<Text style={styles.textStyle}>Start</Text> <Text style={styles.textStyle}>Yes</Text>
</Pressable> </Pressable>
<Pressable <Pressable
style={[styles.button, styles.buttonClose]} style={[styles.button, styles.buttonClose]}
onPress={() => {setModalVisible(!mediumModalVisible)}} onPress={() => {setMediumModalVisible(!mediumModalVisible)}}
> >
<Text style={styles.textStyle}>Cancel</Text> <Text style={styles.textStyle}>No</Text>
</Pressable> </Pressable>
</View> </View>
</View> </View>
...@@ -122,13 +124,13 @@ const styles = StyleSheet.create({ ...@@ -122,13 +124,13 @@ const styles = StyleSheet.create({
alignItems: 'center' alignItems: 'center'
}, },
elementryBtn: { elementryBtn: {
backgroundColor: 'green' backgroundColor: '#6dce99'
}, },
mediumBtn: { mediumBtn: {
backgroundColor: 'blue' backgroundColor: '#4285F4'
}, },
advanceBtn: { advanceBtn: {
backgroundColor: 'red' backgroundColor: '#DB4437'
}, },
image: { image: {
height: 250, height: 250,
...@@ -199,6 +201,12 @@ const styles = StyleSheet.create({ ...@@ -199,6 +201,12 @@ const styles = StyleSheet.create({
marginBottom: 15, marginBottom: 15,
textAlign: "center", textAlign: "center",
fontSize: 20 fontSize: 20
},
modalTextBold: {
marginBottom: 15,
textAlign: "center",
fontSize: 20,
fontWeight: 'bold'
} }
}); });
......
...@@ -108,12 +108,19 @@ const GameOverScreen = ({navigation}) => { ...@@ -108,12 +108,19 @@ const GameOverScreen = ({navigation}) => {
style={styles.image} style={styles.image}
/> />
</View> </View>
<Button title='Play Again' onPress={()=>{navigation.navigate('GameList'); setIsLoading(false); dispatch(memoryActions.clearData());}}/>
<Button title='Finish' onPress={()=>{sendData()}}/>
<View style={styles.resultContainer}> <View style={styles.resultContainer}>
{/* <Text style={styles.resultText}>{!loading ? `Child's disorder level is ${disorderLevel}` : ''}</Text> */} {/* <Text style={styles.resultText}>{!loading ? `Child's disorder level is ${disorderLevel}` : ''}</Text> */}
{resultText} {resultText}
</View> </View>
<View style={styles.buttonContainer}>
<View style={styles.button}>
<Button color={'#4285F4'} title='Play Again' onPress={()=>{navigation.navigate('GameList'); setIsLoading(false); dispatch(memoryActions.clearData());}}/>
</View>
<View style={styles.button}>
<Button color={'#DB4437'} title='Finish' onPress={()=>{sendData()}}/>
</View>
</View>
</View> </View>
); );
} }
...@@ -155,7 +162,17 @@ const styles = StyleSheet.create({ ...@@ -155,7 +162,17 @@ const styles = StyleSheet.create({
textAlign: 'center', textAlign: 'center',
fontSize: 22, fontSize: 22,
fontWeight: 'bold' fontWeight: 'bold'
} },
buttonContainer: {
flexDirection: 'row',
width: 300,
maxWidth: '80%',
justifyContent: 'space-between',
marginTop: 20
},
button: {
width: '40%'
},
}); });
export default GameOverScreen; export default GameOverScreen;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment