Open Bletomus opened 5 years ago
//Snake passing through the walls if (x >= width) x = 0; else if (x < 0) x = width - 1; if (y >= height) y = 0; else if (y < 0) y = height - 1;
this is part of the logic function, to control the snake when passing through the wall.
The array is not being displayed properly in the screen. Snake can escape the borders and navigate the first line to the right