|
|
@ -13,6 +13,9 @@ export default class ScoreBoardComponent extends Component {
|
|
|
|
static get props() { return [] }
|
|
|
|
static get props() { return [] }
|
|
|
|
|
|
|
|
|
|
|
|
player_one_score = 0
|
|
|
|
player_one_score = 0
|
|
|
|
|
|
|
|
player_two_score = 0
|
|
|
|
|
|
|
|
player_one_progress = 0
|
|
|
|
|
|
|
|
player_two_progress = 0
|
|
|
|
|
|
|
|
|
|
|
|
async vue_on_create() {
|
|
|
|
async vue_on_create() {
|
|
|
|
game_service.on_state_change(() => {
|
|
|
|
game_service.on_state_change(() => {
|
|
|
@ -23,5 +26,8 @@ export default class ScoreBoardComponent extends Component {
|
|
|
|
update() {
|
|
|
|
update() {
|
|
|
|
// here is where you should fetch the data from the game service and update variables on the class
|
|
|
|
// here is where you should fetch the data from the game service and update variables on the class
|
|
|
|
this.player_one_score = game_service.get_player_score(Player.One)
|
|
|
|
this.player_one_score = game_service.get_player_score(Player.One)
|
|
|
|
|
|
|
|
this.player_two_score = game_service.get_player_score(Player.Two)
|
|
|
|
|
|
|
|
this.player_one_progress = game_service.get_player_progress(Player.One)
|
|
|
|
|
|
|
|
this.player_two_progress = game_service.get_player_progress(Player.two)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|