bbox-sample.capx
This prints each tile's BBox coordinates. As you can see, adjacent tiles share the same value for the Right of the one tile, and the Left of the adjacent tile.
By scanning all of the tiles, you can detect which share a 'wall', let's call it, and are therefore adjacent.
If this is still too much, you may want to give arrays another try. <img src="smileys/smiley29.gif" border="0" align="middle"> There are several tutorials on arrays on the site.