There is a hell of great trick for working with a 2D array if the array is 16 columns wide by 8 rows (and it probably could be extended to 16 rows, not sure). We use it in chess and checkers programming for board representation, sometimes.
But it's not for beginners - believe me.
Here's a trick that IS for beginners:
Make your array two rows and two columns, larger than your words will be. Assign them a value like -1 or -99. Now you can use that "out of bounds" border as a help in all your searches:
Code:
0000000000
0XXXXXXXX0
0XXXXXXXX0
0XXXXXXXX0
0XXXXXXXX0
0XXXXXXXX0
0XXXXXXXX0
0XXXXXXXX0
0XXXXXXXX0
0000000000
Where X's represent spaces your letters will occupy, and 0's represent border squares.
That help all your diagonal searches, a lot
while sqr != border value
keep getting letters
end while
Running your diagonals clockwise, and using o'clock references for them, is also an idea I found helpful.