import { Component, OnInit } from '@angular/core'; import { Card } from '../card'; import { Hand } from '../hand'; import { ANGOISSE, ANTRE, HAND_CREATURE_MOCK, HAND_TRAQUE_MOCK, PLANET_MOCK, RESERVE_MOCK, RESISTANCE, SCORE_MOCK } from '../mock-card'; import { Planet } from '../planet'; import { PlayerService } from '../player.service'; import { Reserve } from '../reserve'; import { Score } from '../score'; @Component({ selector: 'app-game', templateUrl: './game.component.html', styleUrls: ['./game.component.css'] }) export class GameComponent implements OnInit { score : Score; planet : Planet; reserve : Reserve; hand : Hand; constructor(private playerService : PlayerService) { } ngOnInit() { console.log(this.playerService); this.getScore(); this.getPlanet(); this.getReserve(); this.getHand(); } getScore() : void { this.score = this.playerService.getScore(); } getPlanet() : void { this.planet = this.playerService.getPlanet(); } getReserve() : void { this.reserve = this.playerService.getReserve(); } getHand() : void { this.hand = this.playerService.getHand(); } }