HTML5 Snake Game - add multiple food
<p>I have followed <a href="http://blog.new-bamboo.co.uk/2009/12/30/html5-canvas-snake-game" rel="nofollow">this guide</a> to make my snake game.</p>

<p>But now I want to add more then one food into the map.</p>

<p>Well, I tried putting rows with <code>makeFoodItem();</code> instead of just the default 1 row.
So like:     </p>

<pre><code>makeFoodItem();
makeFoodItem();
makeFoodItem();
makeFoodItem();
makeFoodItem();
</code></pre>

<p>Which also made 5 foods. But the score wasn't added when the snake got them, and they was just removed, and didn't added a new one when it was taken.</p>

<p>So I went into looking at the Function <code>makeFoodItem()</code>, which looks like this:</p>

<pre><code>function makeFoodItem(){
  suggestedPoint = [Math.floor(Math.random()*(canvas.width/gridSize))*gridSize, Math.floor(Math.random()*(canvas.height/gridSize))*gridSize];
  if (snakeBody.some(hasPoint)) {
    makeFoodItem();
  } else {
    ctx.fillStyle = "rgb(10,100,0)";
    ctx.fillRect(suggestedPoint[0], suggestedPoint[1], gridSize, gridSize);
  };
}
</code></pre>

<p>but I could not really figure out what to do there.</p>
