When I include i++; inside this loop I get a runtime error and I have no idea why I get it:
Do you have any idea?
while (i <= 3){
if (tauler[PacMan.y][PacMan.x]==0)
xoc = 0;
else if (tauler[PacMan.y][PacMan.x]==1)
xoc = 1;
else if (tauler[PacMan.y][PacMan.x]==2)
xoc = 2;
else
xoc = 3;
i++;
PacMan.x += dx;
PacMan.y += dy;
}