From c0bb45a07893c3cccb3d07ae64db3d4843a6e24e Mon Sep 17 00:00:00 2001 From: garrettmills Date: Thu, 10 Sep 2020 07:47:37 -0500 Subject: [PATCH] Fix method call name in scoreboard (#4) --- src/components/ScoreBoard.component.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ScoreBoard.component.js b/src/components/ScoreBoard.component.js index b8bc9ce..3cdda0e 100644 --- a/src/components/ScoreBoard.component.js +++ b/src/components/ScoreBoard.component.js @@ -21,13 +21,15 @@ export default class ScoreBoardComponent extends Component { game_service.on_state_change(() => { this.update() }) + + this.update() } update() { // 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_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) + this.player_one_progress = game_service.get_progress(Player.One) + this.player_two_progress = game_service.get_progress(Player.Two) } }