Skip to content

Commit c8af2bd

Browse files
clean: lint code
1 parent 8a67172 commit c8af2bd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

3d/cca_3d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,8 @@ export class CCA3D {
202202
this.state[z][y] = []
203203
this.bufferState[z][y] = []
204204
for (let x = 0; x < this.cubeDimension; x++) {
205-
const randomColor = this.colors[Math.floor(Math.random() * this.colors.length)]
205+
const randomColor =
206+
this.colors[Math.floor(Math.random() * this.colors.length)]
206207
const cell = this.createCell(randomColor, x, y, z, false)
207208
this.state[z][y][x] = cell
208209
// Initialize buffer with same properties but without mesh
@@ -283,16 +284,16 @@ export class CCA3D {
283284
const currentCell = this.state[z][y][x]
284285
const nextColorId = nextCellColorId(currentCell, this.colors)
285286
const successorNeighboursCount = this.getNeighbours(x, y, z).filter(
286-
(neighbour) => neighbour.id === nextColorId
287+
(neighbour) => neighbour.id === nextColorId,
287288
).length
288289

289290
if (successorNeighboursCount >= this.threshold) {
290291
const newColor = this.colorMap.get(nextColorId) ?? currentCell
291-
292+
292293
// Update the buffer state
293294
this.bufferState[z][y][x] = {
294295
...newColor,
295-
mesh: currentCell.mesh
296+
mesh: currentCell.mesh,
296297
}
297298

298299
// Update the visual if color changed
@@ -307,9 +308,8 @@ export class CCA3D {
307308
}
308309
}
309310
}
310-
311311
// Swap buffers
312-
[this.state, this.bufferState] = [this.bufferState, this.state]
312+
;[this.state, this.bufferState] = [this.bufferState, this.state]
313313
}
314314

315315
private getNeighbours(x: number, y: number, z: number): Cell[] {

0 commit comments

Comments
 (0)