game.component.ts 1.13 KB
Newer Older
1
import { Component, OnInit } from '@angular/core';
2
import { Card } from '../card';
Corentin Guillevic's avatar
Corentin Guillevic committed
3
import { Hand } from '../hand';
4
import { ANGOISSE, ANTRE, HAND_CREATURE_MOCK, HAND_TRAQUE_MOCK, PLANET_MOCK, RESERVE_MOCK, RESISTANCE, SCORE_MOCK } from '../mock-card';
Corentin Guillevic's avatar
Corentin Guillevic committed
5
import { Planet } from '../planet';
6
import { PlayerService } from '../player.service';
Corentin Guillevic's avatar
Corentin Guillevic committed
7
import { Reserve } from '../reserve';
8
import { Score } from '../score';
9
10
11
12
13
14
15
@Component({
  selector: 'app-game',
  templateUrl: './game.component.html',
  styleUrls: ['./game.component.css']
})
export class GameComponent implements OnInit {

16
  score : Score;
Corentin Guillevic's avatar
Corentin Guillevic committed
17
  planet : Planet;
Corentin Guillevic's avatar
Corentin Guillevic committed
18
  reserve : Reserve;
Corentin Guillevic's avatar
Corentin Guillevic committed
19
  hand : Hand;
20

21
  constructor(private playerService : PlayerService) { }
22

23
  ngOnInit() {
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
    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();
45
  }
46
}