if(grid[snake[snake_length-1].row][snake[snake_length-1].col] == 'f'){
snake_length=snake_length+1;
}
But you also need to set
snake[x].row =
snake[x].col =
to some meaningful...
Type: Posts; User: Salem
if(grid[snake[snake_length-1].row][snake[snake_length-1].col] == 'f'){
snake_length=snake_length+1;
}
But you also need to set
snake[x].row =
snake[x].col =
to some meaningful...
> for(row=0; row<=maxrow;row++)
> for(col=0;col<=maxcol;col++)
These overrun your array - remember, it's <, not <=
> ...