UNPKG

followjacks-game-of-life

Version:
16 lines (13 loc) 277 B
const cellState = require('./cell_state') class Cell { constructor (state = cellState.DEAD) { this.state = state } isAlive (cell) { return this.state === cellState.ALIVE } isDead (cell) { return this.state === cellState.DEAD } } module.exports = Cell