A better way to describe it.

Here's a 16 x 8 array of Z's, with the Z replaced with X and H's like 
so:

Array2D[6,3,0] = "X "
Array2D[6,3,1] = "H " # direction 1 (north) from array index 6,3
Array2D[6,3,2] = "H " # direction 2 (north east) from array index 6,3
Array2D[6,3,3] = "H "
Array2D[6,3,4] = "X "
Array2D[6,3,5] = "X "
Array2D[6,3,6] = "X "
Array2D[6,3,7] = "X "
Array2D[6,3,8] = "X "

Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z X H H Z Z Z Z Z Z Z Z
Z Z Z Z Z X X H Z Z Z Z Z Z Z Z
Z Z Z Z Z X X X Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z


What I need is Array2D[6,0,1] = "H ", for example, not to make my 
program fall over (array index 6,0 in direction 1 (north) sits outside 
my array).

At the moment it wraps top and bottom like so:

Z Z Z Z Z X X H Z Z Z Z Z Z Z Z
Z Z Z Z Z X X X Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z X H H Z Z Z Z Z Z Z Z

If I remove the top/bottom wrapping, I need it to just cut it off at the 
top, like so:

Z Z Z Z Z X X H Z Z Z Z Z Z Z Z
Z Z Z Z Z X X X Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z Z
-- 
Posted via http://www.ruby-forum.com/.