ADD: class pour le principe S

stub-api
Thomas Chazot 3 years ago
parent aa5674cf82
commit c94585f07f

@ -2,20 +2,8 @@ import { ImageSourcePropType } from 'react-native';
import { Game } from './game' import { Game } from './game'
export class GameCasino extends Game{ export class GameCasino extends Game{
readonly Coef:number;
constructor(name:string, imageSource:ImageSourcePropType, gameSource:string, nbPlayer:number, coef:number){ constructor(name:string, imageSource:ImageSourcePropType, gameSource:string, nbPlayerMin:number, nbPlayerMax:number){
super(name, imageSource, gameSource, nbPlayer); super(name, imageSource, gameSource, nbPlayerMin, nbPlayerMax);
this.Coef=coef;
}
//Get the coefficient of the casino game
getCoef(){
return this.Coef;
}
//Returns the coins gained with the initial bet of the user times the coefficient of the game
betToCoins(bet:number){
return this.Coef*bet;
} }
} }
Loading…
Cancel
Save