Fix bugs

problem in carte[x*width+y] and i don't know why