mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
fix boosters with rotations
This commit is contained in:
parent
e49c1725b5
commit
75b3d9b126
26
dist/vendor.bundle.js
vendored
26
dist/vendor.bundle.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -56,10 +56,10 @@ export class Fragment {
|
|||||||
if (candidates.some((coord) => coord[0] === x && coord[1] === y)) return;
|
if (candidates.some((coord) => coord[0] === x && coord[1] === y)) return;
|
||||||
candidates.push([x, y]);
|
candidates.push([x, y]);
|
||||||
};
|
};
|
||||||
for (let y = 0; y < this.shape.length; y++) {
|
for (let y = 0; y < this.height(rotation); y++) {
|
||||||
for (let x = 0; x < this.shape[y].length; x++) {
|
for (let x = 0; x < this.width(rotation); x++) {
|
||||||
// This cell is full, add all it's neighboors.
|
// This cell is full, add all it's neighboors.
|
||||||
if (!this.shape[y][x]) continue;
|
if (!this.fullAt(x, y, rotation)) continue;
|
||||||
add(x - 1, y);
|
add(x - 1, y);
|
||||||
add(x + 1, y);
|
add(x + 1, y);
|
||||||
add(x, y - 1);
|
add(x, y - 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user