import Component from '../../rivets/Component.js'
import { PLAYER } from './grid.component.js'
import { bindable } from '../../rivets/helpers.js'
// A row of cells in the Connect-4 grid
export default class GridRow extends Component {
static selector() { return 'app-grid-row' }
static template() { return `
` }
cells = Array(8).fill()
constructor(el, data) {
super(el, data)
// This row's row-number
this.row_number = data.rowNumber;
this.parent_grid = data.parentGrid;
this.parent_grid.register_row(this, this.row_number);
}
// Callback for cell creation - gives access to the cell component classes
register_cell(cell_class, column_number) {
this.cells[column_number] = cell_class;
}
}