I have bought a script from codecanyon. The script is developed with create.js, it is a classic snake game where the snakes eats an apple and it's size grows. I have made some customization to the original game logic and added some other items( healthy fruits and unhealthy foods).I'm struggling with one logic, where when the snakes eats a special medicine(which will be displayed after the snake eats 5 food items) the snake size should shrink by one. I'm new to create.js and couldn't find the function which controls the snake size.
Any help would be greatly appreciated :)