diff --git a/assets/no-image.png b/assets/no-image.png new file mode 100644 index 0000000..59a4b36 Binary files /dev/null and b/assets/no-image.png differ diff --git a/data/stub.ts b/data/stub.ts index af96cf8..f700882 100644 --- a/data/stub.ts +++ b/data/stub.ts @@ -4,9 +4,8 @@ export class StubLib { public getCards(): Card[] { const NOUNOURS_LIST : Card[] = [ - new Card("c1","Chewie"), - new Card("r2","Rupert"), - new Card("a3","Ronflex"), + + ] return NOUNOURS_LIST } diff --git a/models/Card.tsx b/models/Card.tsx index ea3c82e..c63b13c 100644 --- a/models/Card.tsx +++ b/models/Card.tsx @@ -1,13 +1,16 @@ import {isValidNumber} from "react-native-gesture-handler/lib/typescript/web_hammer/utils"; +import {CardSet} from "./CardSet"; +import {Type} from "./Type"; +import {Classe} from "./Classe"; export class Card { - constructor(id: string,name :string,set : string,type : string,faction : string,rarity : string,cost : number,attack : number, health : number, desc : string,flavor : string,artist : string,collectible : boolean,elite : boolean,race : string, img : string, imgGold : string) { + constructor(id: number,name :string,set : CardSet,type : Type,clas : Classe,rarity : string,cost : number,attack : number, health : number, desc : string,flavor : string,artist : string,collectible : boolean,elite : boolean,race : string, img : string, imgGold : string, cropImg :string) { this._id=id this._name=name this._set=set this._type=type - this._faction=faction + this._class=clas this._rarity=rarity this._cost=cost this._attack = attack @@ -16,17 +19,16 @@ export class Card { this._flavor = flavor this._artist = artist this._collectible = collectible - this._elite = elite - this._race = race this._img = img this._imgGold = imgGold + this._cropImg = cropImg } // ID // - private _id : string; - get id(): string { + private _id : number; + get id(): number { return this._id } @@ -40,30 +42,30 @@ export class Card { } - private _set : string; - get set(): string{ + private _set : CardSet; + get set(): CardSet{ return this._set } - set set(value : string){ + set set(value : CardSet){ this._set = value } - private _type : string; - get type():string{ + private _type : Type; + get type():Type{ return this._type } - set type(value : string){ + set type(value : Type){ this._type=value } - private _faction : string; + private _class : Classe; - get faction():string{ - return this._faction + get class():Classe{ + return this._class } - set faction(value : string){ - this._faction=value + set class(value : Classe){ + this._class=value } private _rarity : string @@ -128,22 +130,6 @@ export class Card { set collectible(value: boolean ){ this._collectible = value; } - private _elite : boolean - get elite(): boolean { - return this._elite; - } - set elite(value: boolean) { - this._elite = value ; - } - - private _race : string - get race(): string { - return this._race; - } - set race(value: string) { - this._race = value ; - } - private _img : string @@ -161,5 +147,12 @@ export class Card { set imgGold(value: string) { this._imgGold = value ; } + private _cropImg : string + get cropImg(): string { + return this._cropImg; + } + set cropImg(value: string) { + this._cropImg = value; + } } \ No newline at end of file diff --git a/models/CardSet.tsx b/models/CardSet.tsx new file mode 100644 index 0000000..5099582 --- /dev/null +++ b/models/CardSet.tsx @@ -0,0 +1,37 @@ + +export class CardSet { + + constructor(id: number,name : string, type : string ) { + this._id = id + this._name =name + this._type = type + + } + + private _id : number + + get id(): number { + return this._id + } + + // NAME // + private _name : string; + get name(): string { + return this._name; + } + set name(value: string) { + this._name = value; + } + + private _type : string; + get type(): string { + return this._type; + } + set type(value: string) { + this._type = value; + } + + + + +} \ No newline at end of file diff --git a/models/Classe.tsx b/models/Classe.tsx new file mode 100644 index 0000000..fde1c57 --- /dev/null +++ b/models/Classe.tsx @@ -0,0 +1,4 @@ +export class Classe { + constructor(private id : number, private name : string) { + } +} \ No newline at end of file diff --git a/models/Type.tsx b/models/Type.tsx new file mode 100644 index 0000000..ab44953 --- /dev/null +++ b/models/Type.tsx @@ -0,0 +1,5 @@ +export class Type{ + + constructor(private id : number, private name : string) { + } +} \ No newline at end of file diff --git a/navigation/ListNavigator.tsx b/navigation/ListNavigator.tsx index b6efa6b..47e7b3a 100644 --- a/navigation/ListNavigator.tsx +++ b/navigation/ListNavigator.tsx @@ -1,21 +1,21 @@ -import { NavigationContainer } from '@react-navigation/native'; -import { createStackNavigator } from '@react-navigation/stack'; +// import { NavigationContainer } from '@react-navigation/native'; +// import { createStackNavigator } from '@react-navigation/stack'; -import HomeScreen from '../screens/HomeScreen'; -import ListScreen from '../screens/ListScreen'; -import ListFav from '../screens/ListFav'; +// import HomeScreen from '../screens/HomeScreen'; +// import ListScreen from '../screens/ListScreen'; +// import ListFav from '../screens/ListFav'; -export default function ListNavigator() { - const Stack = createStackNavigator(); - return ( - - - - - ) -} \ No newline at end of file +// export default function ListNavigator() { +// const Stack = createStackNavigator(); +// return ( +// +// +// +// +// ) +// } \ No newline at end of file diff --git a/navigation/Navigation.tsx b/navigation/Navigation.tsx index d2d0ce9..6c18b78 100644 --- a/navigation/Navigation.tsx +++ b/navigation/Navigation.tsx @@ -23,7 +23,7 @@ export default function Navigation() { , + tabBarIcon: ({color}) => , }}/> ( @@ -80,11 +82,10 @@ export default function ListScreen({navigation}){ const styles = StyleSheet.create({ container: { flex: 1, - backgroundColor: '#ffffff', + backgroundColor: '#ac9585', alignItems: 'center', - justifyContent: 'center', - borderWidth: 5, - borderColor : "#ff00ff", + justifyContent: 'space-evenly', + }, border: { flex: 1,