Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
21_22-J 38
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
21_22-J 38
21_22-J 38
Commits
de8b82d8
Commit
de8b82d8
authored
May 03, 2022
by
Neranga K.T.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
0c45da9a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
27 deletions
+52
-27
frontend/src/component/memory/Header.js
frontend/src/component/memory/Header.js
+1
-1
frontend/src/constants/Countdown.js
frontend/src/constants/Countdown.js
+2
-2
frontend/src/router/router.js
frontend/src/router/router.js
+11
-11
frontend/src/screen/memory/GameLevel.js
frontend/src/screen/memory/GameLevel.js
+18
-10
frontend/src/screen/memory/GameOverScreen.js
frontend/src/screen/memory/GameOverScreen.js
+20
-3
No files found.
frontend/src/component/memory/Header.js
View file @
de8b82d8
...
...
@@ -15,7 +15,7 @@ const styles = StyleSheet.create({
width
:
'
100%
'
,
height
:
90
,
paddingTop
:
36
,
backgroundColor
:
Colors
.
primary
,
backgroundColor
:
'
#5fcf93
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
},
...
...
frontend/src/constants/Countdown.js
View file @
de8b82d8
export
default
{
elementry
:
2
,
elementry
:
5
,
medium
:
5
,
advance
:
2
advance
:
3
}
\ No newline at end of file
frontend/src/router/router.js
View file @
de8b82d8
...
...
@@ -210,7 +210,7 @@ const AppRouter = () => {
options
=
{{
title
:
'
Memory Games
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
}
}}
/
>
<
Stack
.
Screen
...
...
@@ -220,7 +220,7 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Game Start
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -290,7 +290,7 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Game Over
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -300,7 +300,7 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Results
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -310,7 +310,7 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Levels
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -320,7 +320,7 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Medium Level
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
...
...
@@ -330,7 +330,7 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Advance Level
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
...
...
frontend/src/screen/memory/GameLevel.js
View file @
de8b82d8
...
...
@@ -19,19 +19,20 @@ const GameLevel = ({navigation}) => {
>
<
View
style
=
{
styles
.
centeredView
}
>
<
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
'
}}
>
<
Pressable
style
=
{[
styles
.
button
,
styles
.
buttonClose
]}
onPress
=
{()
=>
{
setModalVisible
(
!
modalVisible
);
navigation
.
navigate
(
'
GameScreenOne
'
);
}}
>
<
Text
style
=
{
styles
.
textStyle
}
>
Start
<
/Text
>
<
Text
style
=
{
styles
.
textStyle
}
>
Yes
<
/Text
>
<
/Pressable
>
<
Pressable
style
=
{[
styles
.
button
,
styles
.
buttonClose
]}
onPress
=
{()
=>
{
setModalVisible
(
!
modalVisible
)}}
>
<
Text
style
=
{
styles
.
textStyle
}
>
Cancel
<
/Text
>
<
Text
style
=
{
styles
.
textStyle
}
>
No
<
/Text
>
<
/Pressable
>
<
/View
>
<
/View
>
...
...
@@ -49,19 +50,20 @@ const GameLevel = ({navigation}) => {
>
<
View
style
=
{
styles
.
centeredView
}
>
<
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
'
}}
>
<
Pressable
style
=
{[
styles
.
button
,
styles
.
buttonClose
]}
onPress
=
{()
=>
{
setModalVisible
(
!
mediumModalVisible
);
navigation
.
navigate
(
'
MediumGameScreenOne
'
);
}}
>
<
Text
style
=
{
styles
.
textStyle
}
>
Start
<
/Text
>
<
Text
style
=
{
styles
.
textStyle
}
>
Yes
<
/Text
>
<
/Pressable
>
<
Pressable
style
=
{[
styles
.
button
,
styles
.
buttonClose
]}
onPress
=
{()
=>
{
setModalVisible
(
!
mediumModalVisible
)}}
onPress
=
{()
=>
{
setM
ediumM
odalVisible
(
!
mediumModalVisible
)}}
>
<
Text
style
=
{
styles
.
textStyle
}
>
Cancel
<
/Text
>
<
Text
style
=
{
styles
.
textStyle
}
>
No
<
/Text
>
<
/Pressable
>
<
/View
>
<
/View
>
...
...
@@ -122,13 +124,13 @@ const styles = StyleSheet.create({
alignItems
:
'
center
'
},
elementryBtn
:
{
backgroundColor
:
'
green
'
backgroundColor
:
'
#6dce99
'
},
mediumBtn
:
{
backgroundColor
:
'
blue
'
backgroundColor
:
'
#4285F4
'
},
advanceBtn
:
{
backgroundColor
:
'
red
'
backgroundColor
:
'
#DB4437
'
},
image
:
{
height
:
250
,
...
...
@@ -199,6 +201,12 @@ const styles = StyleSheet.create({
marginBottom
:
15
,
textAlign
:
"
center
"
,
fontSize
:
20
},
modalTextBold
:
{
marginBottom
:
15
,
textAlign
:
"
center
"
,
fontSize
:
20
,
fontWeight
:
'
bold
'
}
});
...
...
frontend/src/screen/memory/GameOverScreen.js
View file @
de8b82d8
...
...
@@ -108,12 +108,19 @@ const GameOverScreen = ({navigation}) => {
style
=
{
styles
.
image
}
/
>
<
/View
>
<
Button
title
=
'
Play Again
'
onPress
=
{()
=>
{
navigation
.
navigate
(
'
GameList
'
);
setIsLoading
(
false
);
dispatch
(
memoryActions
.
clearData
());}}
/
>
<
Button
title
=
'
Finish
'
onPress
=
{()
=>
{
sendData
()}}
/
>
<
View
style
=
{
styles
.
resultContainer
}
>
{
/* <Text style={styles.resultText}>{!loading ? `Child's disorder level is ${disorderLevel}` : ''}</Text> */
}
{
resultText
}
<
/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
>
);
}
...
...
@@ -155,7 +162,17 @@ const styles = StyleSheet.create({
textAlign
:
'
center
'
,
fontSize
:
22
,
fontWeight
:
'
bold
'
}
},
buttonContainer
:
{
flexDirection
:
'
row
'
,
width
:
300
,
maxWidth
:
'
80%
'
,
justifyContent
:
'
space-between
'
,
marginTop
:
20
},
button
:
{
width
:
'
40%
'
},
});
export
default
GameOverScreen
;
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment