From: Ian Jackson Date: Tue, 6 Jul 2021 00:02:15 +0000 (+0100) Subject: script: Consistently use lower_treat_pinned X-Git-Tag: otter-0.7.2~266 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=67e6896d5ec2dce7bb014fdfdd4ee103c050e992;p=otter.git script: Consistently use lower_treat_pinned PieceInfo.pinned is not the same, and the algorithm needs a coherent idea of what counts. Signed-off-by: Ian Jackson --- diff --git a/templates/script.ts b/templates/script.ts index 4e332338..e90d0772 100644 --- a/templates/script.ts +++ b/templates/script.ts @@ -671,8 +671,9 @@ function lower_pieces(targets_todo: LowerTodoList): } let p = pieces[piece]!; + let p_pinned = lower_treat_pinned(p); if (bottommost_unpinned === null) { // state A - if (!p.pinned) { + if (!p_pinned) { console.log('LOWER WALK', piece, 'STATE A -> Z'); bottommost_unpinned = { p, piece }; } else { @@ -683,7 +684,7 @@ function lower_pieces(targets_todo: LowerTodoList): } // state B - if (p.pinned) { + if (p_pinned) { console.log('LOWER WALK', piece, 'STATE B MIS-STACKED'); tomove_misstacked.push({ p, piece }); } else {