snakePosition[0] = snakePosition[0] + 20
snakePosition
snakePosition
nakePosition[0]
snakePosition
snakeSegments
snakeSegments.insert(0,list(snakePosition))
if snakePosition[0] == raspberryPosition[0] and snakePosition[1] == raspberryPosition[1]:
raspberrySpawned = 0
else:
snakeSegments.pop()
else
snakeSegments
pop
else
if raspberrySpawned == 0:
x = random.randrange(1,32)
y = random.randrange(1,24)
raspberryPosition = [int(x*20),int(y*20)]
raspberrySpawned = 1
raspberrySpawned
snakePosition[1]
insert
pop
0
random
snakeSegments
raspberrySpawned
pop
snakeSegment
0