Pierre Ferreira 2 years ago
commit feb86d0dbd

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

@ -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
}

@ -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;
}
}

@ -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;
}
}

@ -0,0 +1,4 @@
export class Classe {
constructor(private id : number, private name : string) {
}
}

@ -0,0 +1,5 @@
export class Type{
constructor(private id : number, private name : string) {
}
}

@ -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 (
<Stack.Navigator initialRouteName="List">
<Stack.Screen name="List" component={ListScreen}/>
<Stack.Screen name="ListFav" component={ListFav}/>
</Stack.Navigator>
)
}
// export default function ListNavigator() {
// const Stack = createStackNavigator();
// return (
// <Stack.Navigator initialRouteName="List">
// <Stack.Screen name="List" component={ListScreen}/>
// <Stack.Screen name="ListFav" component={ListFav}/>
// </Stack.Navigator>
// )
// }

@ -23,7 +23,7 @@ export default function Navigation() {
<BottomTabNavigator.Screen name="List" component={ListScreen}
options={{
title: 'List',
tabBarIcon: ({color}) => <TabBarIcon name="list" color={color}/>,
tabBarIcon: ({color}) => <TabBarIcon name="th-large" color={color}/>,
}}/>
<BottomTabNavigator.Screen name="Home" component={StackNavigation}
options={{

@ -97,8 +97,6 @@ const styles = StyleSheet.create({
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
borderWidth: 5,
borderColor : "#cacaca",
},
item: {
borderRadius : 15,

@ -13,6 +13,8 @@ import { getAllCards } from "../redux/actions/actionSelection"
import { StubLib } from '../data/stub';
import { Card } from '../models/Card';
import { Image } from 'react-native';
import { ImageURISource } from 'react-native';
//@ts-ignore
const Item = ({title}) => (
@ -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,

Loading…
Cancel
Save