You could do something like this:
Dim board (5,5,1)
(x,y,z)
x= x location
y= y location
z= side (just pick four values, e.g. 1,2,3,4 to indicate left,right,up,down, and store these in this slot. )
Dim board (5,5,1)
(x,y,z)
x= x location
y= y location
z= side (just pick four values, e.g. 1,2,3,4 to indicate left,right,up,down, and store these in this slot. )