Connection Checks I
Ox
Oy
Ox+1
Oy
Ox
Oy+1
Ox+1
Oy+1
A
B
Shown example:
Dx = 1
Dy = 0
Ox
Oy
Ox+1
Oy
Ox
Oy+1
Ox+1
Oy+1
Nx
Ny
Nx+1
Ny
Nx
Ny+1
Nx+1
Ny+1
D
In this example we need to check the following connections:
(Ox+1,Oy) to A:
PX(Ox+1,Oy)
(Ox+1,Oy+1) to B:
PX(Ox+1,Oy+1)
General Connection-test information
We can only check for straight (orthogonal) connections, not diagonal ones (these things are handled differently for each fieldSize anyway).
Because of this there are four (4) fields we can check the connection to from a starting field.
S(x,y)
NY(S)
NX(S)
PX(S)
PY(S)
PX ... Next field along the positive x axis.
NX ... Next field along the negative x axis.
PY ... Next field along the positive y axis.
NY ... Next field along the negative y axis.
PX(S) = Connection to [Sx+1, Sy]
NX(S) = Connection to [Sx-1, Sy]
PY(S) = Connection to [Sx, Sy+1]
NY(S) = Connection to [Sx, Sy-1]
?
?