"Doesn't connect" marks on transport ends that would join one block off (t67 phase 4)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -187,4 +187,20 @@ check('a downhill screw started one block right and one lower than a screw end s
|
||||
check('a screw that already joins stays put',
|
||||
snap('placeBlock(BP_SCREW,1,10,10,true)', 'BP_SCREW', 5, [[11,10],[12,11]]) === 0);
|
||||
check('pieces with no join ends never snap', snap('', 'BP_PIPE', 0, [[11,10]]) === 0);
|
||||
// "Doesn't connect" marks (t67 phase 4): nearMiss says which way one block would make the join.
|
||||
const miss = (setup, expr) => { flatWorld(run, 96, 96, 92); return run(`(()=>{${setup};return ${expr};})()`); };
|
||||
check('a flat belt level with a downhill belt low end is marked: place it one lower (t58)',
|
||||
miss('placeBlock(BP_BELT_DOWN,1,10,10,true);placeBlock(BP_BELT_DOWN,1,11,11,true);placeBlock(BP_BELT,1,12,11,true)', 'nearMiss(12,11,0)') === 1);
|
||||
check('a flat belt one lower at that low end is joined and unmarked',
|
||||
miss('placeBlock(BP_BELT_DOWN,1,10,10,true);placeBlock(BP_BELT_DOWN,1,11,11,true);placeBlock(BP_BELT,1,12,12,true)', 'endJoin(12,12,0)>=0 && nearMiss(12,12,0)===0 && nearMiss(11,11,1)===0'));
|
||||
check('a screw end diagonally off a downhill screw start is marked on both pieces',
|
||||
miss('placeBlock(BP_SCREW,1,10,10,true);placeBlock(BP_SCREW,5,11,11,true)', '[nearMiss(10,10,1),nearMiss(11,11,0)].join()') === '1,-1');
|
||||
check('a drop join (flat feeding an uphill low end on its row) counts as connected',
|
||||
miss('placeBlock(BP_BELT,1,10,10,true);placeBlock(BP_BELT_UP,1,11,10,true)', 'nearMiss(10,10,1)===0 && nearMiss(11,10,0)===0'));
|
||||
check('straight belts one row apart are never marked',
|
||||
miss('placeBlock(BP_BELT,1,10,10,true);placeBlock(BP_BELT,1,11,11,true)', 'nearMiss(10,10,1)===0 && nearMiss(11,11,0)===0'));
|
||||
check('no mark when the block that would fix it is taken',
|
||||
miss('placeBlock(BP_BELT_DOWN,1,10,10,true);placeBlock(BP_BELT_DOWN,1,11,11,true);placeBlock(BP_BELT,1,12,11,true);placeBlock(BP_WALL,RSTONE,12,12,true)', 'nearMiss(12,11,0)') === 0);
|
||||
check('ghosts are checked through their planned map without copying it',
|
||||
miss('ghostBlocks.set(10*BW+10,[BP_SCREW,1]);ghostBlocks.set(11*BW+11,[BP_SCREW,5])', 'nearMiss(10,10,1,ghostBlocks)===1 && ghostBlocks.size===2'));
|
||||
done();
|
||||
|
||||
Reference in New Issue
Block a user