Snake: Difference between revisions

Content added Content deleted
Line 2,301: Line 2,301:
.
.
subr start
subr start
call fruit
fruit
game = 1
game = 1
sx[] = [ 52.5 0 0 0 0 ]
sx[] = [ 52.5 0 0 0 0 ]
Line 2,315: Line 2,315:
textsize 5
textsize 5
move 10 40
move 10 40
text "Arrow keys for control"
text "Arrow keys for controlling"
move 10 30
move 10 30
text "Press space to to start"
text "Press space to to start"
Line 2,329: Line 2,329:
dir = 4
dir = 4
elif keybkey = " " and game = 0
elif keybkey = " " and game = 0
call start
start
.
.
.
.
Line 2,383: Line 2,383:
len sx[] len sx[] + 3
len sx[] len sx[] + 3
len sy[] len sy[] + 3
len sy[] len sy[] + 3
call fruit
fruit
.
.
sx[1] = sx ; sy[1] = sy
sx[1] = sx ; sy[1] = sy