Press any direction and observe how the shark jumps diagonally/jumps two tiles/stays stationary.
If you want, undo that last turn and observe how the other directions behave.
Seeing the shark move two tiles is unexpected because there's only one rule executing exactly once and all it should do is teleport the shark one tile. What actually happens is that the shark consumes the movement of the player! This only happens when Shark and Player are on the same collision layer (don't forget to reload the level when messing with layers) which is what makes me think that it is consuming the movement.
In short, the rule
[ Player | Shark ] -> [ Shark | ]
acts like the rule
[ movement Player | Shark ] -> [ movement Shark | ]
if and only if Player and Shark are on the same layer.
https://www.puzzlescript.net/editor.html?hack=3d873d66c7d58a8c0e3d5f612afd6eb1 To reproduce:
Seeing the shark move two tiles is unexpected because there's only one rule executing exactly once and all it should do is teleport the shark one tile. What actually happens is that the shark consumes the movement of the player! This only happens when Shark and Player are on the same collision layer (don't forget to reload the level when messing with layers) which is what makes me think that it is consuming the movement.
In short, the rule [ Player | Shark ] -> [ Shark | ] acts like the rule [ movement Player | Shark ] -> [ movement Shark | ] if and only if Player and Shark are on the same layer.