Data update

This commit is contained in:
Ingy döt Net 2025-06-11 20:16:52 -04:00
parent 72eb4943cb
commit 4d5544505c
2347 changed files with 62432 additions and 16731 deletions

View file

@ -10,18 +10,15 @@ subr start
dir = random 4
timer 0
.
background 242
move 30 70
clear
color 997
text "SNAKE"
textsize 5
move 6 40
text "Keys or mouse for controlling"
move 6 30
text "Space or click to to start"
gbackground 242
gclear
gcolor 997
gtext 30 70 "SNAKE"
gtextsize 5
gtext 6 40 "Keys or mouse for controlling"
gtext 6 30 "Space or click to start"
#
on key
on key_down
if game = 0 and keybkey = " "
start
return
@ -59,16 +56,19 @@ on mouse_down
.
.
.
proc over .
gcolor 997
gtext 10 10 "Space or click for new game"
game = 2
timer 1
.
on timer
clear
color 997
move 2 95
text "Score: " & 10 * len sx[] - 50
color 966
move rx ry
circle 1.5
#
sx = sx[1] ; sy = sy[1]
if game = 2
game = 0
return
.
sx = sx[1]
sy = sy[1]
if dir = 1
sy += 5
elif dir = 2
@ -79,45 +79,44 @@ on timer
sx -= 5
.
if sx < 0 or sx > 100 or sy < 0 or sy > 100
game = 0
over
return
.
color 494
for i = len sx[] downto 2
if sx = sx[i] and sy = sy[i]
game = 0
over
return
.
.
gclear
gcolor 997
gtext 2 95 "Score: " & 10 * len sx[] - 50
gcolor 966
gcircle rx ry 1.5
#
gcolor 494
for i = len sx[] downto 2
sx[i] = sx[i - 1]
sy[i] = sy[i - 1]
if sx[i] > 0
move sx[i] sy[i]
circle 2.5
gcircle sx[i] sy[i] 2.5
.
.
move sx sy
circle 2.5
color 000
gcircle sx sy 2.5
gcolor 000
if dir = 2 or dir = 4
move sx sy + 1
circle 0.5
move sx sy - 1
circle 0.5
gcircle sx sy + 1 0.5
gcircle sx sy - 1 0.5
else
move sx + 1 sy
circle 0.5
move sx - 1 sy
circle 0.5
gcircle sx + 1 sy 0.5
gcircle sx - 1 sy 0.5
.
if sx = rx and sy = ry
len sx[] len sx[] + 3
len sy[] len sy[] + 3
fruit
.
sx[1] = sx ; sy[1] = sy
if game = 1
timer 0.15
else
color 997
move 10 10
text "Space or click new game"
.
sx[1] = sx
sy[1] = sy
timer 0.15
.