wok diff sokojs/stuff/undo.u @ rev 25076
Up marlin (886)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Jun 14 08:17:07 2022 +0000 (2022-06-14) |
parents | db9d9cb3c164 |
children |
line diff
1.1 --- a/sokojs/stuff/undo.u Sat Oct 23 10:55:42 2021 +0000 1.2 +++ b/sokojs/stuff/undo.u Tue Jun 14 08:17:07 2022 +0000 1.3 @@ -84,8 +84,8 @@ 1.4 + d = undoDir(c) 1.5 + a = manpos - d 1.6 + if (c != c.toLowerCase()) { 1.7 -+ if (level[a] == boxin && level[manpos] != boxin) nbBoxin++ 1.8 -+ if (level[a] != boxin && level[manpos] == boxin) nbBoxin-- 1.9 ++ if (level[a] == boxin && level[manpos] != dest) nbBoxin++ 1.10 ++ if (level[a] != boxin && level[manpos] == dest) nbBoxin-- 1.11 + print_moves(--moves) 1.12 + level[a] = (level[a] == boxin) ? dest : floor 1.13 + level[manpos] = (level[manpos] == dest) ? boxin : boxout