GongShangSCC / FirstProject

0 stars 0 forks source link

Bug with the display #9

Open Bletomus opened 5 years ago

Bletomus commented 5 years ago

The array is not being displayed properly in the screen. Snake can escape the borders and navigate the first line to the right

andyquicks commented 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.