Snake
Script
v7
Fork
1
2
3
4
5
6
7
8
9
10
11
12
13
export
function
Snake
(
{
x
,
y
,
dir
}
)
{
return
{
body
:
[
{
x
,
y
,
pX
:
x
-
1
,
pY
:
y
,
}
,
]
,
dir
,
}
;
}