Joins follow the travel direction: the next piece goes right after the end (t67 phase 2b)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -10,10 +10,10 @@ for (const code of ['BP_BELT_UP', 'BP_BELT_DOWN', 'BP_FILTER_UP', 'BP_FILTER_DOW
|
||||
run(`
|
||||
mat.fill(EMPTY); part.fill(0); blockP.fill(0); blockV.fill(0);
|
||||
var artCode = ${code}, artGrade = beltGrade(artCode), artB = 12 * BW + 12;
|
||||
for (let k = -2; k <= 2; k++) placeBlock(artCode, 1, 12 + k, 12 + artGrade * k, true);
|
||||
for (let k = -2; k <= 2; k++) placeBlock(artCode, artGrade > 0 ? 1 : 0, 12 + k, 12 + artGrade * k, true);
|
||||
prepareSlopeBelts(0, 0, W, H);
|
||||
`);
|
||||
check(`${code}: diagonal neighbours continue the band`, run('(slopeBeltJoins[artB] & 12) === 12'));
|
||||
check(`${code}: downhill diagonal neighbours continue the band`, run('(slopeBeltJoins[artB] & 12) === 12'));
|
||||
check(`${code}: corner seals use the same band`, run(`(() => {
|
||||
const i = slopeSeal(artCode, 12, 12);
|
||||
return i < 0 || slopeBeltAt(i, i % W, (i / W) | 0) >= 0;
|
||||
@@ -35,7 +35,7 @@ for (const code of ['BP_BELT_UP', 'BP_BELT_DOWN', 'BP_FILTER_UP', 'BP_FILTER_DOW
|
||||
for (let end = 0; end < 2; end++) {
|
||||
const side = end ? 1 : -1;
|
||||
removeBlock(12 + side, 12 + side * artGrade, true);
|
||||
placeBlock(BP_BELT, 1, 12 + side, 12 + (end ? artGrade > 0 : artGrade < 0), true);
|
||||
placeBlock(BP_BELT, artGrade > 0 ? 1 : 0, 12 + side, 12 + (end ? artGrade > 0 : artGrade < 0), true);
|
||||
}
|
||||
prepareSlopeBelts(0, 0, W, H);
|
||||
`);
|
||||
|
||||
Reference in New Issue
Block a user