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
956b3062
Commit
956b3062
authored
May 03, 2022
by
Neranga K.T.
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'it18256888' into 'master'
It18256888 See merge request
!187
parents
0c45da9a
8ff095e7
Changes
5
Hide 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 @
956b3062
...
...
@@ -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 @
956b3062
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 @
956b3062
...
...
@@ -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,8 +300,8 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Results
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
name
=
"
GameLevel
"
...
...
@@ -310,8 +310,8 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Levels
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
name
=
"
MediumLevelStart
"
...
...
@@ -320,8 +320,8 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Medium Level
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
name
=
"
AdvanceLevelStart
"
...
...
@@ -330,8 +330,8 @@ const AppRouter = () => {
headerShown
:
true
,
title
:
'
Advance Level
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
headerStyle
:
{
backgroundColor
:
'
#5fcf93
'
},
}}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
...
...
frontend/src/screen/memory/GameLevel.js
View file @
956b3062
...
...
@@ -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 @
956b3062
...
...
@@ -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