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
3e113650
Commit
3e113650
authored
May 01, 2022
by
Neranga K.T.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
game levels
parent
74018e38
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
195 additions
and
15600 deletions
+195
-15600
frontend/package-lock.json
frontend/package-lock.json
+8
-15597
frontend/package.json
frontend/package.json
+1
-0
frontend/src/component/UI/HeaderButton.js
frontend/src/component/UI/HeaderButton.js
+17
-0
frontend/src/router/router.js
frontend/src/router/router.js
+45
-1
frontend/src/screen/memory/AdvanceLevelStart.js
frontend/src/screen/memory/AdvanceLevelStart.js
+20
-0
frontend/src/screen/memory/GameLevel.js
frontend/src/screen/memory/GameLevel.js
+44
-0
frontend/src/screen/memory/GameList.js
frontend/src/screen/memory/GameList.js
+22
-2
frontend/src/screen/memory/MediumLevelStart.js
frontend/src/screen/memory/MediumLevelStart.js
+19
-0
frontend/src/screen/memory/MemoryResult.js
frontend/src/screen/memory/MemoryResult.js
+19
-0
No files found.
frontend/package-lock.json
View file @
3e113650
This diff is collapsed.
Click to expand it.
frontend/package.json
View file @
3e113650
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
"react-native-table-component"
:
"^1.2.1"
,
"react-native-table-component"
:
"^1.2.1"
,
"react-native-tts"
:
"^4.1.0"
,
"react-native-tts"
:
"^4.1.0"
,
"react-native-vector-icons"
:
"^9.0.0"
,
"react-native-vector-icons"
:
"^9.0.0"
,
"react-navigation-header-buttons"
:
"^9.0.1"
,
"react-redux"
:
"^7.2.6"
,
"react-redux"
:
"^7.2.6"
,
"redux"
:
"^4.1.2"
"redux"
:
"^4.1.2"
},
},
...
...
frontend/src/component/UI/HeaderButton.js
0 → 100644
View file @
3e113650
import
React
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Platform
}
from
'
react-native
'
;
import
{
HeaderButton
}
from
'
react-navigation-header-buttons
'
import
Icon
from
'
react-native-vector-icons/Ionicons
'
;
const
CustomHeaderButton
=
(
props
)
=>
{
return
(
<
HeaderButton
{...
props
}
IconComponent
=
{
Icon
}
iconSize
=
{
23
}
color
=
{
Platform
.
OS
===
'
android
'
?
'
white
'
:
'
white
'
}
/
>
);
}
export
default
CustomHeaderButton
;
\ No newline at end of file
frontend/src/router/router.js
View file @
3e113650
...
@@ -40,6 +40,10 @@ import GameScreenFiveAll from '../screen/memory/elementry/GameScreenFiveAll';
...
@@ -40,6 +40,10 @@ import GameScreenFiveAll from '../screen/memory/elementry/GameScreenFiveAll';
import
GameScreenSix
from
'
../screen/memory/elementry/GameScreenSix
'
;
import
GameScreenSix
from
'
../screen/memory/elementry/GameScreenSix
'
;
import
GameScreenSixAll
from
'
../screen/memory/elementry/GameScreenSixAll
'
;
import
GameScreenSixAll
from
'
../screen/memory/elementry/GameScreenSixAll
'
;
import
GameOverScreen
from
'
../screen/memory/GameOverScreen
'
;
import
GameOverScreen
from
'
../screen/memory/GameOverScreen
'
;
import
MemoryResult
from
'
../screen/memory/MemoryResult
'
;
import
GameLevel
from
'
../screen/memory/GameLevel
'
;
import
MediumLevelStart
from
'
../screen/memory/MediumLevelStart
'
;
import
AdvanceLevelStart
from
'
../screen/memory/AdvanceLevelStart
'
;
import
Sam
from
'
../screen/sample/sam
'
;
import
Sam
from
'
../screen/sample/sam
'
;
import
Progress
from
'
../screen/Progress
'
;
import
Progress
from
'
../screen/Progress
'
;
...
@@ -164,7 +168,7 @@ const AppRouter = () => {
...
@@ -164,7 +168,7 @@ const AppRouter = () => {
options
=
{{
options
=
{{
title
:
'
Memory Games
'
,
title
:
'
Memory Games
'
,
headerTintColor
:
'
white
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
}
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
}
}}
}}
/
>
/
>
<
Stack
.
Screen
<
Stack
.
Screen
...
@@ -247,6 +251,46 @@ const AppRouter = () => {
...
@@ -247,6 +251,46 @@ const AppRouter = () => {
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
}}
/
>
/
>
<
Stack
.
Screen
name
=
'
MemoryResult
'
component
=
{
MemoryResult
}
options
=
{{
headerShown
:
true
,
title
:
'
Results
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
/
>
<
Stack
.
Screen
name
=
'
GameLevel
'
component
=
{
GameLevel
}
options
=
{{
headerShown
:
true
,
title
:
'
Levels
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
/
>
<
Stack
.
Screen
name
=
'
MediumLevelStart
'
component
=
{
MediumLevelStart
}
options
=
{{
headerShown
:
true
,
title
:
'
Medium Level
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
/
>
<
Stack
.
Screen
name
=
'
AdvanceLevelStart
'
component
=
{
AdvanceLevelStart
}
options
=
{{
headerShown
:
true
,
title
:
'
Advance Level
'
,
headerTintColor
:
'
white
'
,
headerStyle
:
{
backgroundColor
:
Colors
.
primary
},
}}
/
>
<
Stack
.
Screen
<
Stack
.
Screen
options
=
{{
headerShown
:
false
}}
options
=
{{
headerShown
:
false
}}
name
=
"
PrimaryType
"
name
=
"
PrimaryType
"
...
...
frontend/src/screen/memory/AdvanceLevelStart.js
0 → 100644
View file @
3e113650
import
React
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Button
}
from
'
react-native
'
;
const
AdvanceLevelStart
=
()
=>
{
return
(
<
View
style
=
{
styles
.
screen
}
>
<
Text
>
Advance
Level
Start
<
/Text
>
<
Button
title
=
'
Start
'
onPress
=
{()
=>
{}}
/
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
screen
:
{
flex
:
1
,
padding
:
10
}
});
export
default
AdvanceLevelStart
;
\ No newline at end of file
frontend/src/screen/memory/GameLevel.js
0 → 100644
View file @
3e113650
import
{
Center
,
Column
,
Row
}
from
'
native-base
'
;
import
React
from
'
react
'
;
import
{
Text
,
View
,
StyleSheet
,
Button
}
from
'
react-native
'
;
const
GameLevel
=
({
navigation
})
=>
{
return
(
<
View
style
=
{
styles
.
screen
}
>
<
View
style
=
{
styles
.
levelWrapper
}
>
<
View
style
=
{
styles
.
levelContainer
}
>
<
Button
style
=
{
styles
.
btn
}
title
=
'
Elementry
'
onPress
=
{()
=>
{
navigation
.
navigate
(
'
StartGameScreen
'
)}}
/
>
<
Button
style
=
{
styles
.
btn
}
title
=
'
Medium
'
onPress
=
{()
=>
{
navigation
.
navigate
(
'
MediumLevelStart
'
)}}
/
>
<
Button
style
=
{
styles
.
btn
}
title
=
'
Advance
'
onPress
=
{()
=>
{
navigation
.
navigate
(
'
AdvanceLevelStart
'
)}}
/
>
<
/View
>
<
/View
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
screen
:
{
flex
:
1
,
padding
:
30
},
levelContainer
:
{
maxWidth
:
'
100%
'
,
height
:
'
60%
'
,
flexDirection
:
'
column
'
,
justifyContent
:
'
space-between
'
,
alignItems
:
'
center
'
,
paddingHorizontal
:
30
},
levelWrapper
:
{
width
:
'
100%
'
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
},
btn
:
{
maxWidth
:
'
100%
'
,
height
:
30
}
});
export
default
GameLevel
;
frontend/src/screen/memory/GameList.js
View file @
3e113650
import
{
NavigationContainer
}
from
'
@react-navigation/native
'
;
import
{
NavigationContainer
}
from
'
@react-navigation/native
'
;
import
{
Center
}
from
'
native-base
'
;
import
{
Center
}
from
'
native-base
'
;
import
React
from
'
react
'
;
import
React
,
{
useLayoutEffect
}
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
FlatList
,
TouchableOpacity
}
from
'
react-native
'
;
import
{
View
,
Text
,
StyleSheet
,
FlatList
,
TouchableOpacity
}
from
'
react-native
'
;
import
CategoryItem
from
'
../../component/memory/CategoryItem
'
;
import
CategoryItem
from
'
../../component/memory/CategoryItem
'
;
import
{
CATEGORIES
}
from
'
../../memory/data/dummy-data
'
;
import
{
CATEGORIES
}
from
'
../../memory/data/dummy-data
'
;
import
{
HeaderButtons
,
Item
}
from
'
react-navigation-header-buttons
'
;
import
HeaderButton
from
'
../../component/UI/HeaderButton
'
;
const
GameList
=
({
navigation
})
=>
{
const
GameList
=
({
navigation
})
=>
{
const
renderItem
=
(
itemData
)
=>
{
const
renderItem
=
(
itemData
)
=>
{
return
(
return
(
...
@@ -12,10 +15,27 @@ const GameList = ({navigation}) => {
...
@@ -12,10 +15,27 @@ const GameList = ({navigation}) => {
id
=
{
itemData
.
item
.
id
}
id
=
{
itemData
.
item
.
id
}
title
=
{
itemData
.
item
.
title
}
title
=
{
itemData
.
item
.
title
}
image
=
{
itemData
.
item
.
url
}
image
=
{
itemData
.
item
.
url
}
onSelectGame
=
{()
=>
{
navigation
.
navigate
(
"
StartGameScreen
"
)}}
onSelectGame
=
{()
=>
{
navigation
.
navigate
(
"
GameLevel
"
)}}
/
>
/
>
);
);
}
}
useLayoutEffect
(()
=>
{
navigation
.
setOptions
({
headerRight
:
()
=>
(
<
HeaderButtons
HeaderButtonComponent
=
{
HeaderButton
}
>
<
Item
title
=
'
Flag
'
iconName
=
'
flag
'
onPress
=
{()
=>
{
navigation
.
navigate
(
'
MemoryResult
'
)}}
/
>
<
/HeaderButtons
>
)
});
},[
navigation
]);
return
(
return
(
<
View
style
=
{
styles
.
screen
}
>
<
View
style
=
{
styles
.
screen
}
>
<
FlatList
<
FlatList
...
...
frontend/src/screen/memory/MediumLevelStart.js
0 → 100644
View file @
3e113650
import
React
from
'
react
'
;
import
{
Text
,
View
,
StyleSheet
,
Button
}
from
'
react-native
'
;
const
MediumLevelStart
=
()
=>
{
return
(
<
View
style
=
{
styles
.
screen
}
>
<
Text
>
Medium
Level
<
/Text
>
<
Button
title
=
'
Start
'
onPress
=
{()
=>
{}}
/
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
screen
:
{
flex
:
1
}
});
export
default
MediumLevelStart
;
frontend/src/screen/memory/MemoryResult.js
0 → 100644
View file @
3e113650
import
React
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
}
from
'
react-native
'
;
const
MemoryResult
=
()
=>
{
return
(
<
View
style
=
{
styles
.
screen
}
>
<
Text
>
Result
Screen
<
/Text
>
<
/View
>
);
}
const
styles
=
StyleSheet
.
create
({
screen
:
{
flex
:
1
,
padding
:
10
}
});
export
default
MemoryResult
;
\ 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