updates
This commit is contained in:
@@ -96,4 +96,18 @@ export default class SomaSolution {
|
||||
clone.solutionSpaces = this.solutionSpaces.slice();
|
||||
return clone;
|
||||
}
|
||||
|
||||
getDims() {
|
||||
return [this.dim, this.dim, this.dim];
|
||||
}
|
||||
|
||||
forEachCell(cb: (val: number, x: number, y: number, z: number) => any) {
|
||||
loopStart: for (let x = 0; x < this.dim; x++) {
|
||||
for (let y = 0; y < this.dim; y++) {
|
||||
for (let z = 0; z < this.dim; z++) {
|
||||
cb(this.at(x, y, z), x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user