I\'m making a snake game in java. To make it efficient, I only paint the positions that have changed this frame (the first and last cells of the snake).
Here\'s my code:<