We can represent setting
maxfood based on size
//Add this to the end of the Fish class' mutate method this.maxfood = round(this.size*3+10);
More chances to hit food vs more need to collect food
This way starving fish can't "cheat" natural selection by suddenly making a fully healthy baby fish just before it dies.
var maxPlants = 200;
In real-life plants can die for many different reasons
We are going to combine all of those reasons into a single probability. A 2% chance for each plant to die every frame.
deadwhose value starts as false
.filterto remove any dead plants from the plantArray