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
5828225f
Commit
5828225f
authored
Jul 16, 2022
by
Neranga K.T.
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
258b7494
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
168 additions
and
19 deletions
+168
-19
frontend/src/component/memory/CategoryItem.js
frontend/src/component/memory/CategoryItem.js
+1
-1
frontend/src/constants/Countdown.js
frontend/src/constants/Countdown.js
+2
-2
frontend/src/constants/endpoint.js
frontend/src/constants/endpoint.js
+1
-1
frontend/src/screen/memory/GameLevel.js
frontend/src/screen/memory/GameLevel.js
+1
-1
frontend/src/screen/memory/GameOverScreen.js
frontend/src/screen/memory/GameOverScreen.js
+20
-2
frontend/src/screen/memory/MemoryResult.js
frontend/src/screen/memory/MemoryResult.js
+143
-12
No files found.
frontend/src/component/memory/CategoryItem.js
View file @
5828225f
...
...
@@ -64,7 +64,7 @@ const styles = StyleSheet.create({
title
:
{
color
:
'
white
'
,
fontFamily
:
'
open-sans-bold
'
,
fontSize
:
18
,
fontSize
:
22
,
textAlign
:
'
center
'
,
},
titleContainer
:
{
...
...
frontend/src/constants/Countdown.js
View file @
5828225f
export
default
{
elementry
:
5
,
medium
:
5
,
elementry
:
1
,
medium
:
1
,
advance
:
3
}
\ No newline at end of file
frontend/src/constants/endpoint.js
View file @
5828225f
export
default
api
=
'
http://192.168.231.95:5000/
'
\ No newline at end of file
export
default
api
=
'
http://192.168.8.170:5000
'
\ No newline at end of file
frontend/src/screen/memory/GameLevel.js
View file @
5828225f
...
...
@@ -91,7 +91,7 @@ const GameLevel = ({navigation}) => {
style
=
{
styles
.
image
}
>
{
/* <Text style={styles.title}>Play Memo</Text> */
}
<
View
style
=
{
styles
.
titleContainer
}
>
<
Text
style
=
{
styles
.
title
}
numberOfLines
=
{
1
}
>
Play
Memo
<
/Text
>
<
Text
style
=
{
styles
.
title
}
numberOfLines
=
{
1
}
>
Memo
<
/Text
>
<
/View
>
<
/ImageBackground
>
<
/View
>
...
...
frontend/src/screen/memory/GameOverScreen.js
View file @
5828225f
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Button
,
Image
}
from
'
react-native
'
;
import
React
,
{
useState
,
useEffect
,
useLayoutEffect
}
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
,
Button
,
Image
,
}
from
'
react-native
'
;
import
Colors
from
'
../../constants/Colors
'
;
import
{
useDispatch
,
useSelector
}
from
'
react-redux
'
;
import
*
as
memoryActions
from
'
../../store/actions/memory
'
;
import
endpoint
from
'
../../constants/endpoint
'
;
import
{
HeaderButtons
,
Item
}
from
'
react-navigation-header-buttons
'
;
import
HeaderButton
from
'
../../component/UI/HeaderButton
'
;
const
GameOverScreen
=
({
navigation
})
=>
{
...
...
@@ -17,6 +19,22 @@ const GameOverScreen = ({navigation}) => {
console
.
log
(
passedTime
);
console
.
log
(
passedLevel
);
useLayoutEffect
(()
=>
{
navigation
.
setOptions
({
headerRight
:
()
=>
(
<
HeaderButtons
HeaderButtonComponent
=
{
HeaderButton
}
>
<
Item
title
=
'
Flag
'
iconName
=
'
flag
'
onPress
=
{()
=>
{
navigation
.
navigate
(
'
MemoryResult
'
)}}
/
>
<
/HeaderButtons
>
)
});
},[
navigation
]);
let
totalTime
=
0
;
for
(
const
key
in
passedTime
){
...
...
frontend/src/screen/memory/MemoryResult.js
View file @
5828225f
import
React
from
'
react
'
;
import
{
View
,
Text
,
StyleSheet
}
from
'
react-native
'
;
//
import React from 'react';
//
import {View, Text, StyleSheet} from 'react-native';
const
MemoryResult
=
()
=>
{
return
(
<
View
style
=
{
styles
.
screen
}
>
//
const MemoryResult = () => {
//
return(
//
<View style={styles.screen}>
<
/View
>
);
// </View>
// );
// }
// const styles = StyleSheet.create({
// screen: {
// flex: 1,
// padding: 10
// }
// });
// export default MemoryResult;
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
{
StyleSheet
,
View
,
Text
,
Pressable
,
ImageBackground
,
TouchableOpacity
,
Image
,
ScrollView
,
StatusBar
,
}
from
'
react-native
'
;
import
{
SafeAreaView
}
from
'
react-native-safe-area-context
'
;
import
Orientation
from
'
react-native-orientation-locker
'
;
import
{
useNavigation
}
from
'
@react-navigation/native
'
;
// import BackButton from '../../../component/BackButton';
import
TableList
from
'
../../component/reading/TableList
'
;
import
{
ImagePaths
}
from
'
../../assets/read/data/ReadData
'
;
export
default
function
ReadResults
()
{
const
navigation
=
useNavigation
();
React
.
useEffect
(()
=>
{
StatusBar
.
setHidden
(
true
);
// getColorResult();
const
unsubscribe
=
navigation
.
addListener
(
'
focus
'
,
()
=>
{
// The screen is focused
// Call any action
Orientation
.
unlockAllOrientations
();
Orientation
.
lockToPortrait
();
});
return
unsubscribe
;
},
[
navigation
]);
return
(
// <SafeAreaView>
// <ScrollView>
// <View style={{flexDirection: 'column'}}>
// <ImageBackground
// style={styles.image}
// source={ImagePaths.backgroundBasic}>
// {/* <View><BackButton path="Color" /></View> */}
// {/* <View style={styles.container}>
// <Image
// style={styles.logo}
// source={require('../../../assets/result/title.png')}
// />
// </View> */}
// <View style={styles.imageContainer}>{/* <TableList /> */}</View>
// </ImageBackground>
// </View>
// </ScrollView>
// </SafeAreaView>
<
SafeAreaView
>
<
View
style
=
{{
flexDirection
:
'
column
'
}}
>
<
ImageBackground
style
=
{
styles
.
image
}
source
=
{
ImagePaths
.
resultBackground
}
>
<
View
style
=
{
styles
.
textBody
}
>
<
Text
style
=
{
styles
.
text
}
>
Your
Results
<
/Text
>
<
/View
>
<
View
style
=
{
styles
.
imageContainer
}
>
{
/* <View > */
}
<
TableList
/>
{
/* </View> */
}
<
/View
>
<
View
>
<
Image
style
=
{
styles
.
temp
}
source
=
{
ImagePaths
.
chart
}
><
/Image
>
<
/View
>
<
/ImageBackground
>
<
/View
>
<
/SafeAreaView
>
);
}
const
styles
=
StyleSheet
.
create
({
screen
:
{
flex
:
1
,
padding
:
10
}
image
:
{
width
:
'
100%
'
,
height
:
'
100%
'
,
},
container
:
{
// backgroundColor : '#fff',
marginTop
:
30
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
},
logo
:
{
marginTop
:
80
,
width
:
'
30%
'
,
height
:
'
30%
'
,
},
imageContainer
:
{
flexDirection
:
'
row
'
,
marginTop
:
1
,
},
textBody
:
{
marginTop
:
10
,
marginLeft
:
90
,
// backgroundColor: '#00008B',
width
:
220
,
borderRadius
:
50
,
padding
:
5
,
},
text
:
{
fontSize
:
35
,
justifyContent
:
'
center
'
,
alignItems
:
'
center
'
,
color
:
'
black
'
,
borderRadius
:
10
,
backgroundColor
:
'
rgba(2, 202, 106, 0.17)
'
,
textAlign
:
'
center
'
,
fontWeight
:
'
bold
'
,
},
temp
:
{
marginTop
:
100
,
marginLeft
:
80
,
// backgroundColor: '#00008B',
width
:
220
,
height
:
200
,
borderRadius
:
50
,
padding
:
5
,
},
});
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