From b5a903d599bfa8b80d1dfcfcea1e43cb34ac2bfe Mon Sep 17 00:00:00 2001 From: garrettmills Date: Wed, 9 Sep 2020 11:34:13 -0500 Subject: [PATCH] Modify game board component to accept passed-in rows (#3) --- src/components/GameBoard.component.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/GameBoard.component.js b/src/components/GameBoard.component.js index 44d7b91..66f5673 100644 --- a/src/components/GameBoard.component.js +++ b/src/components/GameBoard.component.js @@ -38,7 +38,7 @@ const template = ` export default class GameBoardComponent extends Component { static get selector() { return 'app-game-board' } static get template() { return template } - static get props() { return [] } + static get props() { return ['rows'] } /** * If true, the grid is ready to be rendered. If false, @@ -52,13 +52,11 @@ export default class GameBoardComponent extends Component { * an array of grid cell values. * @type {Array>} */ - rows = [] + // rows = [] column_labels = ["A", "B", "C", "D", "E", "F", "G", "H", "I"] async vue_on_create() { - this.rows = game_service.get_current_player_state() - this.ready = true - + this.ready = true } }