the code splits an matrix into an sets of zones.
e.g the X = 1 and Y = 1 is ID = X + Y * 10 = 11 and it is an corner so we add it to corners list.
We repete steps until the end of the matrix
how can i improve this code?
split :-
retractall(corner(_)),
retractall(outer_corner(_))...