A VM instruction that attempts to turn a hakk left or right by 90 degrees in the playfield.

The blocks that makeup a hakk are not allowed to overlap in the arena, nor are hakks allowed to move outside of the arena. If the turn request causes an overlap, or causes the hakk to go out of bounds, then it will fail and store 0. If the move succeeds, it will store 1.

0 in the second argument means "turn left" or counterclockwise

1 in the second argument means "turn right" or clockwise

Usage Edit

turn: [{store}, {direction(0|1)}]

hakkML Example Edit

name: turn_example
  entry: {name: 'main', loc: [0, 1]}
    - rem: attempt to turn left, store result in core.0
    - turn: [core.0, 0]
    - je: [core.0, 1, yes]
    - out: 'Turn did not succeed.'
    - exit: 0
    - lbl: yes
    - out: 'Turn succeeded.'
    - exit: 0