chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ba33676
)
script: Make non-moveable pieces bottom, when lowerint
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Mon, 5 Jul 2021 22:23:58 +0000
(23:23 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Tue, 6 Jul 2021 00:24:15 +0000
(
01:24
+0100)
This avoids lowering pieces below the hand they are in, etc.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index 933781b51fffb1258b66f0ba0fc481467ca6ceb5..5c45c7a1f9231ceb9f3ee67305736ec523c19298 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-565,7
+565,7
@@
type LowerTodoList = { [piece: string]: LowerTodoItem };
keyops_local['lower'] = function (uo: UoRecord) { lower_targets(uo); }
function lower_treat_bottom(p: PieceInfo): boolean {
- return wresting || p.pinned;
+ return wresting || p.pinned
|| p.moveable == "No"
;
}
function lower_targets(uo: UoRecord): boolean {