(size, buffer, paint = () => {})
| 1 | class Grid { |
| 2 | constructor(size, buffer, paint = () => {}) { |
| 3 | const sizeSquared = size * size; |
| 4 | this.buffer = buffer; |
| 5 | this.size = size; |
| 6 | this.cells = new Uint8Array(this.buffer, 0, sizeSquared); |
| 7 | this.nextCells = new Uint8Array(this.buffer, sizeSquared, sizeSquared); |
| 8 | this.paint = paint; |
| 9 | } |
| 10 | |
| 11 | getCell(x, y) { |
| 12 | const size = this.size; |
nothing calls this directly
no outgoing calls
no test coverage detected