pbignardi / snake-js

Javascript to play Snake
1 stars 0 forks source link

Food object #18

Open pbignardi opened 4 months ago

pbignardi commented 4 months ago

Constructed an object that represent a food piece. Each time one is consumed, a new one is created by reinitialising the object. Still to-do: avoid tail of the snake, as per issue #1. To achieve this, the tail of the snake should be passed to the constructor of the food object