diff options
Diffstat (limited to 'addons/snake/snake.script')
| -rw-r--r-- | addons/snake/snake.script | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/addons/snake/snake.script b/addons/snake/snake.script new file mode 100644 index 00000000..2cf07a51 --- /dev/null +++ b/addons/snake/snake.script @@ -0,0 +1,37 @@ +# pardes --addon-test snake.so addons/snake/snake.script | diff addons/snake/snake.out - +seed 3 +size 40 30 +# It steps a cell each 150 ms while its pane has the keyboard (the first +# tick sets the pace). +tick 150 +tick 150 +# k turns it up, l right: onto the food, one longer and a point. +key k +tick 150 +key l +tick 150 +tick 150 +# h is back on itself: refused, it goes on right; then j down. +key h +tick 150 +key j +tick 150 +ctl +body +# The window loses the keyboard: it stands still and asks for no ticks. +blur +settle +tick 600 +# Back, it goes on, the first tick setting its pace again. +focus +tick 150 +tick 150 +# Its record is its state: the pane comes back from it as it was. +dump +tick 150 +# Into the bottom wall: over, asking for nothing until a key starts it again. +tick 150 +tick 150 +settle +key x +tick 150 |
