If each LED is represented in a Bit Array, numbered from 0-63, from 0 at top left to 63 at bottom right, then, for any given LED 'x', it's neighbours are simply x-9, x-8, x-7, x-1, x+1, X+7, x+8 and x+9. The same routine can then be used on any cell in the array. Some extra code will have to account for display edges otherwise the patterns will 'wrap' out of one side of the screen and re-enter from the other... but then again that then will look like an interesting 'perpetual' colony!