I am a beginner in Processing and for my assignment I would like to create a snake game. Here are my steps:
Draw background
Create apple system; spawn one in on the grid when another is eaten
Death system; check if snake head has hit sides or itself
Controls
Restart
Growing; if snake eats apple, grow by one unit
Make the snake
I have already drawn the background. I would like help with the apple system; how can I get the apple to spawn on one of the squares in my grid? Thanks in advance.
I plan on the apple just being a 27x27 red square that spawns on a square in a grid. I haven’t learnt arrays yet, is there a way I could use the random() function and do something with that? I don’t exactly know what I’m doing. Sorry.