diff --git a/bob_party/src/components/GameComponent.tsx b/bob_party/src/components/GameComponent.tsx index 7f74b07..3cd9ae4 100644 --- a/bob_party/src/components/GameComponent.tsx +++ b/bob_party/src/components/GameComponent.tsx @@ -8,6 +8,7 @@ import { Game } from "../core/game" Importing the correct stylesheet */ import styles from './style/Game.style'; +import LobbySolo from "../screens/LobbySolo" export const GameComponent : /* @@ -17,9 +18,10 @@ export const GameComponent : FC<{game: Game, nav: any}> = ({game, nav}) => { + return ( - nav.navigate("CookieClicker")}> + createNewMatchSolo(game, nav)}> = ) +} + +function createNewMatchSolo(game : Game, nav: any) { + + + nav.navigate("LobbySolo") } \ No newline at end of file diff --git a/bob_party/src/navigation/AppNavigator.tsx b/bob_party/src/navigation/AppNavigator.tsx index d58258a..1debeaa 100644 --- a/bob_party/src/navigation/AppNavigator.tsx +++ b/bob_party/src/navigation/AppNavigator.tsx @@ -12,7 +12,8 @@ import SkinList from '../screens/SkinList' import GameChoice from '../screens/GameChoice' import SignIn from '../screens/SignIn' import SignUp from '../screens/SignUp' -import CookieClicker from '../Games/CookieClicker/CookieClicker' +import LobbySolo from '../screens/LobbySolo' + const HomeStack = createStackNavigator(); @@ -25,7 +26,7 @@ function HomeStackScreen() { - + ); } @@ -70,6 +71,21 @@ function ProfileStackScreen() { ); } +const GameChoiceStack = createStackNavigator(); + +/* + Stack of screens for the profile and the changement of informations +*/ +function GameChoiceStackScreen() { + return ( + + + + + ); +} + + const Tab = createBottomTabNavigator() /* Tab navigator to navigate between the stacks diff --git a/bob_party/src/screens/GameChoice.tsx b/bob_party/src/screens/GameChoice.tsx index 29f0c88..be437be 100644 --- a/bob_party/src/screens/GameChoice.tsx +++ b/bob_party/src/screens/GameChoice.tsx @@ -13,12 +13,13 @@ import { GameSolo } from '../core/gameSolo'; let tabConv:Conversation[]=[]; -const msc = require('../../assets/Icons/FondGris.png'); +const cookieClicker= new GameSolo(1, "Cookie Clicker", require('../../assets/Icons/UnSelected/Gamepad.png'), "/Games/CookieClicker/cookieClicker.tsx", 1, 1, new Map); + -//const UserActu=new User("14", "leBg", "MdpDeOuf", "ouioui", "grand", new Date(2022,12,12), 12222, 123324, 12, tabSkinApp[0], tabSkinApp, tabConv); -const cookieClicker= new GameSolo(1, "Cookie Clicker", "https://codefirst.iut.uca.fr/git/BOB_PARTEAM/BOB_PARTY/raw/branch/typescript/bob_party/assets/BobsSkins/BobYellowGreenBlueHeart.png", "/Games/CookieClicker/cookieClicker.tsx", 1, 1, new Map); function GameChoice(props: { navigation: any; }) { const { navigation } = props + + return ( - - - navigation.navigate('GameChoice')} - /> - navigation.navigate('GameChoice')} - /> + + + + navigation.navigate('GameChoiceTab')} + /> + navigation.navigate('GameChoiceTab')} + /> + + - - - ); + ); } export default Home \ No newline at end of file diff --git a/bob_party/src/screens/LobbySolo.tsx b/bob_party/src/screens/LobbySolo.tsx new file mode 100644 index 0000000..2701b5e --- /dev/null +++ b/bob_party/src/screens/LobbySolo.tsx @@ -0,0 +1,31 @@ +import { StatusBar } from 'expo-status-bar' +import { View} from 'react-native' +import React from 'react'; +import stylesScreen from './style/screens.style' +import { TopBar } from '../components/TopBar'; +import { BotBar } from '../components/BotBar'; +import { Conversation } from '../core/conversation'; +import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice'; + + + +let tabConv:Conversation[]=[]; + +function LobbySolo(props: { navigation: any; }) { + + const { navigation } = props + + + return ( + + + navigation.navigate('GameChoice')} + /> + + + ); +} + +export default LobbySolo \ No newline at end of file