ADD: ajout de la classe game solo

(pas finit)
stub-api
Thomas Chazot 3 years ago
parent 8cff01ad3a
commit 5d10073117

@ -14,13 +14,13 @@
"@react-navigation/stack": "^6.3.2", "@react-navigation/stack": "^6.3.2",
"expo": "^46.0.15", "expo": "^46.0.15",
"expo-status-bar": "~1.4.0", "expo-status-bar": "~1.4.0",
"jest": "^29.1.2", "jest": "^26.6.3",
"node": "^18.10.0", "node": "^18.10.0",
"react": "18.0.0", "react": "18.0.0",
"react-dom": "18.0.0", "react-dom": "18.0.0",
"react-native": "^0.69.6", "react-native": "^0.69.6",
"react-native-gesture-handler": "^2.7.1", "react-native-gesture-handler": "~2.5.0",
"react-native-safe-area-context": "^4.4.1", "react-native-safe-area-context": "4.3.1",
"react-native-web": "~0.18.7" "react-native-web": "~0.18.7"
}, },
"devDependencies": { "devDependencies": {

@ -1,10 +1,10 @@
import { FC, ReactNode } from "react" import { FC, ReactNode } from "react"
import { Button, Image, ImageStyle, Text, View } from "react-native" import { Button, Image, ImageStyle, Text, View } from "react-native"
import { Skin } from "../core/Skin" import { Skin } from "../core/Skin"
import { Asset } from 'expo-asset';
import React from "react" import React from "react"
export const SkinComponent : FC<{skin: Skin, children: ImageStyle}> = ({skin, children}) => { export const SkinComponent : FC<{skin: Skin, children: ImageStyle}> = ({skin, children}) => {
return ( return (
<View> <View>
<Image source={ skin.getSkinSource()} style={children}/> <Image source={ skin.getSkinSource()} style={children}/>

@ -0,0 +1,5 @@
import { Game } from './game'
export class GameSolo extends Game{
private
}

@ -1,5 +1,5 @@
import { StatusBar } from 'expo-status-bar' import { StatusBar } from 'expo-status-bar'
import { StyleSheet, View, Text, Alert, Pressable, Image} from 'react-native' import { StyleSheet, View, Text, Alert, Pressable, Image, ImageSourcePropType} from 'react-native'
import React, { Children } from 'react'; import React, { Children } from 'react';
import { SkinComponent } from '../components/skinAvatar'; import { SkinComponent } from '../components/skinAvatar';
import { User } from '../core/user'; import { User } from '../core/user';
@ -11,6 +11,11 @@ import { Conversation } from '../core/conversation';
const avatar = require('../../assets/Icons/BobClassic.png'); const avatar = require('../../assets/Icons/BobClassic.png');
let test:ImageSourcePropType;
const test2:string="('../../assets/Icons/BobClassic.png')";
test = test2 as ImageSourcePropType;
let tabSkin:Skin[]; let tabSkin:Skin[];
const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png')); const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png'));
const skinTest2= new Skin("wesh",require('../../assets/BobsSkins/BobBlue.png')); const skinTest2= new Skin("wesh",require('../../assets/BobsSkins/BobBlue.png'));

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save