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
5d3c53d0
Commit
5d3c53d0
authored
May 01, 2022
by
Neranga K.T.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advance screen
parent
ce9405ab
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
117 additions
and
51 deletions
+117
-51
frontend/src/router/router.js
frontend/src/router/router.js
+73
-1
frontend/src/screen/memory/AdvanceLevelStart.js
frontend/src/screen/memory/AdvanceLevelStart.js
+2
-2
frontend/src/screen/memory/advance/AdvanceGameScreenFive.js
frontend/src/screen/memory/advance/AdvanceGameScreenFive.js
+4
-4
frontend/src/screen/memory/advance/AdvanceGameScreenFiveAll.js
...end/src/screen/memory/advance/AdvanceGameScreenFiveAll.js
+3
-3
frontend/src/screen/memory/advance/AdvanceGameScreenFour.js
frontend/src/screen/memory/advance/AdvanceGameScreenFour.js
+4
-10
frontend/src/screen/memory/advance/AdvanceGameScreenFourAll.js
...end/src/screen/memory/advance/AdvanceGameScreenFourAll.js
+3
-3
frontend/src/screen/memory/advance/AdvanceGameScreenOne.js
frontend/src/screen/memory/advance/AdvanceGameScreenOne.js
+5
-5
frontend/src/screen/memory/advance/AdvanceGameScreenOneAll.js
...tend/src/screen/memory/advance/AdvanceGameScreenOneAll.js
+3
-3
frontend/src/screen/memory/advance/AdvanceGameScreenSix.js
frontend/src/screen/memory/advance/AdvanceGameScreenSix.js
+4
-4
frontend/src/screen/memory/advance/AdvanceGameScreenSixAll.js
...tend/src/screen/memory/advance/AdvanceGameScreenSixAll.js
+2
-2
frontend/src/screen/memory/advance/AdvanceGameScreenThree.js
frontend/src/screen/memory/advance/AdvanceGameScreenThree.js
+4
-4
frontend/src/screen/memory/advance/AdvanceGameScreenThreeAll.js
...nd/src/screen/memory/advance/AdvanceGameScreenThreeAll.js
+3
-3
frontend/src/screen/memory/advance/AdvanceGameScreenTwo.js
frontend/src/screen/memory/advance/AdvanceGameScreenTwo.js
+4
-4
frontend/src/screen/memory/advance/AdvanceGameScreenTwoAll.js
...tend/src/screen/memory/advance/AdvanceGameScreenTwoAll.js
+3
-3
No files found.
frontend/src/router/router.js
View file @
5d3c53d0
...
...
@@ -51,6 +51,18 @@ import MediumGameScreenFive from '../screen/memory/medium/MediumGameScreenFive';
import
MediumGameScreenFiveAll
from
'
../screen/memory/medium/MediumGameScreenFiveAll
'
;
import
MediumGameScreenSix
from
'
../screen/memory/medium/MediumGameScreenSix
'
;
import
MediumGameScreenSixAll
from
'
../screen/memory/medium/MediumGameScreenSixAll
'
;
import
AdvanceGameScreenOne
from
'
../screen/memory/advance/AdvanceGameScreenOne
'
;
import
AdvanceGameScreenOneAll
from
'
../screen/memory/advance/AdvanceGameScreenOneAll
'
;
import
AdvanceGameScreenTwo
from
'
../screen/memory/advance/AdvanceGameScreenTwo
'
;
import
AdvanceGameScreenTwoAll
from
'
../screen/memory/advance/AdvanceGameScreenTwoAll
'
;
import
AdvanceGameScreenThree
from
'
../screen/memory/advance/AdvanceGameScreenThree
'
;
import
AdvanceGameScreenThreeAll
from
'
../screen/memory/advance/AdvanceGameScreenThreeAll
'
;
import
AdvanceGameScreenFour
from
'
../screen/memory/advance/AdvanceGameScreenFour
'
;
import
AdvanceGameScreenFourAll
from
'
../screen/memory/advance/AdvanceGameScreenFourAll
'
;
import
AdvanceGameScreenFive
from
'
../screen/memory/advance/AdvanceGameScreenFive
'
;
import
AdvanceGameScreenFiveAll
from
'
../screen/memory/advance/AdvanceGameScreenFiveAll
'
;
import
AdvanceGameScreenSix
from
'
../screen/memory/advance/AdvanceGameScreenSix
'
;
import
AdvanceGameScreenSixAll
from
'
../screen/memory/advance/AdvanceGameScreenSixAll
'
;
import
GameOverScreen
from
'
../screen/memory/GameOverScreen
'
;
import
MemoryResult
from
'
../screen/memory/MemoryResult
'
;
import
GameLevel
from
'
../screen/memory/GameLevel
'
;
...
...
@@ -303,7 +315,7 @@ const AppRouter = () => {
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
/
>
<
Stack
.
Screen
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
MediumGameScreenOne
"
component
=
{
MediumGameScreenOne
}
...
...
@@ -363,6 +375,66 @@ const AppRouter = () => {
name
=
"
MediumGameScreenSixAll
"
component
=
{
MediumGameScreenSixAll
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenOne
"
component
=
{
AdvanceGameScreenOne
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenOneAll
"
component
=
{
AdvanceGameScreenOneAll
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenTwo
"
component
=
{
AdvanceGameScreenTwo
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenTwoAll
"
component
=
{
AdvanceGameScreenTwoAll
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenThree
"
component
=
{
AdvanceGameScreenThree
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenThreeAll
"
component
=
{
AdvanceGameScreenThreeAll
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenFour
"
component
=
{
AdvanceGameScreenFour
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenFourAll
"
component
=
{
AdvanceGameScreenFourAll
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenFive
"
component
=
{
AdvanceGameScreenFive
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenFiveAll
"
component
=
{
AdvanceGameScreenFiveAll
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenSix
"
component
=
{
AdvanceGameScreenSix
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
AdvanceGameScreenSixAll
"
component
=
{
AdvanceGameScreenSixAll
}
/
>
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
name
=
"
PrimaryType
"
...
...
frontend/src/screen/memory/AdvanceLevelStart.js
View file @
5d3c53d0
import
React
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Button
}
from
'
react-native
'
;
const
AdvanceLevelStart
=
()
=>
{
const
AdvanceLevelStart
=
(
{
navigation
}
)
=>
{
return
(
<
View
style
=
{
styles
.
screen
}
>
<
Text
>
Advance
Level
Start
<
/Text
>
<
Button
title
=
'
Start
'
onPress
=
{()
=>
{}}
/
>
<
Button
title
=
'
Start
'
onPress
=
{()
=>
{
navigation
.
navigate
(
'
AdvanceGameScreenOne
'
)
}}
/
>
<
/View
>
);
}
...
...
frontend/src/screen/memory/advance/GameScreenFive.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenFive.js
View file @
5d3c53d0
...
...
@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import
CountDown
from
'
react-native-countdown-component
'
;
import
Countdown
from
'
../../../constants/Countdown
'
;
const
GameScreenFive
=
({
navigation
})
=>
{
const
Advance
GameScreenFive
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
sreen
}
>
...
...
@@ -16,9 +16,9 @@ const GameScreenFive = ({navigation}) => {
<
/View
>
<
CountDown
size
=
{
40
}
until
=
{
Countdown
.
elementry
}
until
=
{
Countdown
.
advance
}
// onFinish={() => alert('Finished')}
onFinish
=
{()
=>
navigation
.
navigate
(
'
GameScreenFiveAll
'
)}
onFinish
=
{()
=>
navigation
.
navigate
(
'
Advance
GameScreenFiveAll
'
)}
digitStyle
=
{{
backgroundColor
:
'
#FFF
'
,
borderWidth
:
2
,
borderColor
:
'
#1CC625
'
}}
digitTxtStyle
=
{{
color
:
'
#1CC625
'
}}
timeLabelStyle
=
{{
color
:
'
red
'
,
fontWeight
:
'
bold
'
}}
...
...
@@ -66,4 +66,4 @@ const GameScreenFive = ({navigation}) => {
}
});
export
default
GameScreenFive
;
\ No newline at end of file
export
default
AdvanceGameScreenFive
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenFiveAll.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenFiveAll.js
View file @
5d3c53d0
...
...
@@ -6,7 +6,7 @@ import { SCREEN5 } from '../../../memory/data/elementry-level';
let
gameData
=
SCREEN5
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
const
GameScreenFiveAll
=
({
navigation
})
=>
{
const
Advance
GameScreenFiveAll
=
({
navigation
})
=>
{
const
shuffle
=
()
=>
{
gameData
=
SCREEN5
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
...
...
@@ -38,7 +38,7 @@ const GameScreenFiveAll = ({navigation}) => {
const
renderImageItem
=
(
itemData
)
=>
{
return
(
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
GameScreenSix
'
)}}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
Advance
GameScreenSix
'
)}}
>
<
Image
style
=
{
styles
.
image
}
source
=
{
itemData
.
item
.
source
}
/
>
<
/TouchableOpacity
>
)
...
...
@@ -87,4 +87,4 @@ const styles = StyleSheet.create({
});
export
default
GameScreenFiveAll
;
\ No newline at end of file
export
default
AdvanceGameScreenFiveAll
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenFour.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenFour.js
View file @
5d3c53d0
...
...
@@ -3,13 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import
CountDown
from
'
react-native-countdown-component
'
;
import
Countdown
from
'
../../../constants/Countdown
'
;
const
GameScreenFour
=
({
navigation
})
=>
{
useEffect
(()
=>
{
setTimeout
(
()
=>
{
navigation
.
navigate
(
'
GameScreenFourAll
'
);
},
5000
);
});
const
AdvanceGameScreenFour
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
sreen
}
>
...
...
@@ -23,9 +17,9 @@ const GameScreenFour = ({navigation}) => {
<
Text
style
=
{
styles
.
imageText
}
>
Car
-
කාරය
<
/Text
>
<
CountDown
size
=
{
40
}
until
=
{
Countdown
.
elementry
}
until
=
{
Countdown
.
advance
}
// onFinish={() => alert('Finished')}
onFinish
=
{()
=>
navigation
.
navigate
(
'
GameScreenFourAll
'
)}
onFinish
=
{()
=>
navigation
.
navigate
(
'
Advance
GameScreenFourAll
'
)}
digitStyle
=
{{
backgroundColor
:
'
#FFF
'
,
borderWidth
:
2
,
borderColor
:
'
#1CC625
'
}}
digitTxtStyle
=
{{
color
:
'
#1CC625
'
}}
timeLabelStyle
=
{{
color
:
'
red
'
,
fontWeight
:
'
bold
'
}}
...
...
@@ -72,4 +66,4 @@ const GameScreenFour = ({navigation}) => {
}
});
export
default
GameScreenFour
;
\ No newline at end of file
export
default
AdvanceGameScreenFour
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenFourAll.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenFourAll.js
View file @
5d3c53d0
...
...
@@ -6,7 +6,7 @@ import { SCREEN4 } from '../../../memory/data/elementry-level';
let
gameData
=
SCREEN4
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
const
GameScreenFourAll
=
({
navigation
})
=>
{
const
Advance
GameScreenFourAll
=
({
navigation
})
=>
{
const
shuffle
=
()
=>
{
gameData
=
SCREEN4
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
...
...
@@ -38,7 +38,7 @@ const GameScreenFourAll = ({navigation}) => {
const
renderImageItem
=
(
itemData
)
=>
{
return
(
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
GameScreenFive
'
)}}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
Advance
GameScreenFive
'
)}}
>
<
Image
style
=
{
styles
.
image
}
source
=
{
itemData
.
item
.
source
}
/
>
<
/TouchableOpacity
>
)
...
...
@@ -87,4 +87,4 @@ const styles = StyleSheet.create({
});
export
default
GameScreenFourAll
;
\ No newline at end of file
export
default
AdvanceGameScreenFourAll
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenOne.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenOne.js
View file @
5d3c53d0
...
...
@@ -7,7 +7,7 @@ import * as memoryActions from '../../../store/actions/memory';
import
Levels
from
'
../../../constants/Levels
'
;
import
Countdown
from
'
../../../constants/Countdown
'
;
const
GameScreenOne
=
({
navigation
})
=>
{
const
Advance
GameScreenOne
=
({
navigation
})
=>
{
// useEffect(()=>{
// const backHandler = BackHandler.addEventListener('hardwareBackPress', () => true)
...
...
@@ -17,7 +17,7 @@ const GameScreenOne = ({navigation}) => {
const
dispatch
=
useDispatch
();
useEffect
(()
=>
{
dispatch
(
memoryActions
.
setGameLevel
(
Levels
.
elementry
))
dispatch
(
memoryActions
.
setGameLevel
(
Levels
.
advance
))
})
return
(
...
...
@@ -32,9 +32,9 @@ const GameScreenOne = ({navigation}) => {
<
Text
style
=
{
styles
.
imageText
}
>
Pencil
-
පැන්සල
<
/Text
>
<
CountDown
size
=
{
40
}
until
=
{
Countdown
.
elementry
}
until
=
{
Countdown
.
advance
}
// onFinish={() => alert('Finished')}
onFinish
=
{()
=>
navigation
.
navigate
(
'
GameScreenOneAll
'
)}
onFinish
=
{()
=>
navigation
.
navigate
(
'
Advance
GameScreenOneAll
'
)}
digitStyle
=
{{
backgroundColor
:
'
#FFF
'
,
borderWidth
:
2
,
borderColor
:
'
#1CC625
'
}}
digitTxtStyle
=
{{
color
:
'
#1CC625
'
}}
timeLabelStyle
=
{{
color
:
'
red
'
,
fontWeight
:
'
bold
'
}}
...
...
@@ -81,4 +81,4 @@ const styles = StyleSheet.create({
}
});
export
default
GameScreenOne
;
\ No newline at end of file
export
default
AdvanceGameScreenOne
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenOneAll.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenOneAll.js
View file @
5d3c53d0
...
...
@@ -6,7 +6,7 @@ import { SCREEN1 } from '../../../memory/data/elementry-level';
let
gameData
=
SCREEN1
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
const
GameScreenOneAll
=
({
navigation
})
=>
{
const
Advance
GameScreenOneAll
=
({
navigation
})
=>
{
const
shuffle
=
()
=>
{
gameData
=
SCREEN1
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
...
...
@@ -38,7 +38,7 @@ const GameScreenOneAll = ({navigation}) => {
const
renderImageItem
=
(
itemData
)
=>
{
return
(
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
GameScreenTwo
'
)}}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
Advance
GameScreenTwo
'
)}}
>
<
Image
style
=
{
styles
.
image
}
source
=
{
itemData
.
item
.
source
}
/
>
<
/TouchableOpacity
>
)
...
...
@@ -86,4 +86,4 @@ const styles = StyleSheet.create({
});
export
default
GameScreenOneAll
;
\ No newline at end of file
export
default
AdvanceGameScreenOneAll
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenSix.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenSix.js
View file @
5d3c53d0
...
...
@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import
CountDown
from
'
react-native-countdown-component
'
;
import
Countdown
from
'
../../../constants/Countdown
'
;
const
GameScreenSix
=
({
navigation
})
=>
{
const
Advance
GameScreenSix
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
sreen
}
>
...
...
@@ -17,9 +17,9 @@ const GameScreenSix = ({navigation}) => {
<
Text
style
=
{
styles
.
imageText
}
>
Pencil
-
පැන්සල
<
/Text
>
<
CountDown
size
=
{
40
}
until
=
{
Countdown
.
elementry
}
until
=
{
Countdown
.
advance
}
// onFinish={() => alert('Finished')}
onFinish
=
{()
=>
navigation
.
navigate
(
'
GameScreenSixAll
'
)}
onFinish
=
{()
=>
navigation
.
navigate
(
'
Advance
GameScreenSixAll
'
)}
digitStyle
=
{{
backgroundColor
:
'
#FFF
'
,
borderWidth
:
2
,
borderColor
:
'
#1CC625
'
}}
digitTxtStyle
=
{{
color
:
'
#1CC625
'
}}
timeLabelStyle
=
{{
color
:
'
red
'
,
fontWeight
:
'
bold
'
}}
...
...
@@ -66,4 +66,4 @@ const GameScreenSix = ({navigation}) => {
}
});
export
default
GameScreenSix
;
\ No newline at end of file
export
default
AdvanceGameScreenSix
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenSixAll.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenSixAll.js
View file @
5d3c53d0
...
...
@@ -6,7 +6,7 @@ import { SCREEN6 } from '../../../memory/data/elementry-level';
let
gameData
=
SCREEN6
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
const
GameScreenSixAll
=
({
navigation
})
=>
{
const
Advance
GameScreenSixAll
=
({
navigation
})
=>
{
const
shuffle
=
()
=>
{
gameData
=
SCREEN6
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
...
...
@@ -87,4 +87,4 @@ const styles = StyleSheet.create({
});
export
default
GameScreenSixAll
;
\ No newline at end of file
export
default
AdvanceGameScreenSixAll
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenThree.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenThree.js
View file @
5d3c53d0
...
...
@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import
CountDown
from
'
react-native-countdown-component
'
;
import
Countdown
from
'
../../../constants/Countdown
'
;
const
GameScreenThree
=
({
navigation
})
=>
{
const
Advance
GameScreenThree
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
sreen
}
>
...
...
@@ -17,9 +17,9 @@ const GameScreenThree = ({navigation}) => {
<
Text
style
=
{
styles
.
imageText
}
>
Flower
-
මල
<
/Text
>
<
CountDown
size
=
{
40
}
until
=
{
Countdown
.
elementry
}
until
=
{
Countdown
.
advance
}
// onFinish={() => alert('Finished')}
onFinish
=
{()
=>
navigation
.
navigate
(
'
GameScreenThreeAll
'
)}
onFinish
=
{()
=>
navigation
.
navigate
(
'
Advance
GameScreenThreeAll
'
)}
digitStyle
=
{{
backgroundColor
:
'
#FFF
'
,
borderWidth
:
2
,
borderColor
:
'
#1CC625
'
}}
digitTxtStyle
=
{{
color
:
'
#1CC625
'
}}
timeLabelStyle
=
{{
color
:
'
red
'
,
fontWeight
:
'
bold
'
}}
...
...
@@ -66,4 +66,4 @@ const GameScreenThree = ({navigation}) => {
}
});
export
default
GameScreenThree
;
\ No newline at end of file
export
default
AdvanceGameScreenThree
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenThreeAll.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenThreeAll.js
View file @
5d3c53d0
...
...
@@ -6,7 +6,7 @@ import { SCREEN3 } from '../../../memory/data/elementry-level';
let
gameData
=
SCREEN3
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
const
GameScreenThreeAll
=
({
navigation
})
=>
{
const
Advance
GameScreenThreeAll
=
({
navigation
})
=>
{
const
shuffle
=
()
=>
{
gameData
=
SCREEN3
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
...
...
@@ -38,7 +38,7 @@ const GameScreenThreeAll = ({navigation}) => {
const
renderImageItem
=
(
itemData
)
=>
{
return
(
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
GameScreenFour
'
)}}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
Advance
GameScreenFour
'
)}}
>
<
Image
style
=
{
styles
.
image
}
source
=
{
itemData
.
item
.
source
}
/
>
<
/TouchableOpacity
>
)
...
...
@@ -87,4 +87,4 @@ const styles = StyleSheet.create({
});
export
default
GameScreenThreeAll
;
\ No newline at end of file
export
default
AdvanceGameScreenThreeAll
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenTwo.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenTwo.js
View file @
5d3c53d0
...
...
@@ -3,7 +3,7 @@ import {View, Text, StyleSheet, Image} from 'react-native';
import
CountDown
from
'
react-native-countdown-component
'
;
import
Countdown
from
'
../../../constants/Countdown
'
;
const
GameScreenTwo
=
({
navigation
})
=>
{
const
Advance
GameScreenTwo
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
sreen
}
>
...
...
@@ -17,9 +17,9 @@ const GameScreenTwo = ({navigation}) => {
<
Text
style
=
{
styles
.
imageText
}
>
Ball
-
බෝලය
<
/Text
>
<
CountDown
size
=
{
40
}
until
=
{
Countdown
.
elementry
}
until
=
{
Countdown
.
advance
}
// onFinish={() => alert('Finished')}
onFinish
=
{()
=>
navigation
.
navigate
(
'
GameScreenTwoAll
'
)}
onFinish
=
{()
=>
navigation
.
navigate
(
'
Advance
GameScreenTwoAll
'
)}
digitStyle
=
{{
backgroundColor
:
'
#FFF
'
,
borderWidth
:
2
,
borderColor
:
'
#1CC625
'
}}
digitTxtStyle
=
{{
color
:
'
#1CC625
'
}}
timeLabelStyle
=
{{
color
:
'
red
'
,
fontWeight
:
'
bold
'
}}
...
...
@@ -66,4 +66,4 @@ const GameScreenTwo = ({navigation}) => {
}
});
export
default
GameScreenTwo
;
\ No newline at end of file
export
default
AdvanceGameScreenTwo
;
\ No newline at end of file
frontend/src/screen/memory/advance/GameScreenTwoAll.js
→
frontend/src/screen/memory/advance/
Advance
GameScreenTwoAll.js
View file @
5d3c53d0
...
...
@@ -7,7 +7,7 @@ import { SCREEN2 } from '../../../memory/data/elementry-level';
let
gameData
=
SCREEN2
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
const
GameScreenTwoAll
=
({
navigation
})
=>
{
const
Advance
GameScreenTwoAll
=
({
navigation
})
=>
{
const
shuffle
=
()
=>
{
gameData
=
SCREEN2
.
sort
((
item
)
=>
Math
.
random
(
item
.
id
)
-
0.5
);
...
...
@@ -39,7 +39,7 @@ const GameScreenTwoAll = ({navigation}) => {
const
renderImageItem
=
(
itemData
)
=>
{
return
(
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
GameScreenThree
'
)}}
>
<
TouchableOpacity
activeOpacity
=
{
0.7
}
style
=
{
styles
.
imageItem
}
onPress
=
{()
=>
{
dispatch
(
memoryActions
.
setAnswers
({
question
:
itemData
.
item
.
question
,
answer
:
itemData
.
item
.
answer
}));
setTimeOn
(
false
);
dispatch
(
memoryActions
.
setTime
({
question
:
itemData
.
item
.
question
,
time
:
time
}));
gameData
=
[];
navigation
.
navigate
(
'
Advance
GameScreenThree
'
)}}
>
<
Image
style
=
{
styles
.
image
}
source
=
{
itemData
.
item
.
source
}
/
>
<
/TouchableOpacity
>
)
...
...
@@ -88,4 +88,4 @@ const styles = StyleSheet.create({
});
export
default
GameScreenTwoAll
;
\ No newline at end of file
export
default
AdvanceGameScreenTwoAll
;
\ 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