I am writing a simple game called 'Bombs'. Each player clicks on a 6 x 7 grid to add a bomb. When a square reaches its maximum it explodes and only adjacent squares increment a bomb. Such that corner squares max is two, the edge squares (other than corners) are three and the central ones are four. Once a square reaches its maximum that square's bomb count is zeroed. Eventually the program enters self perpetuation.

I have made a recursive internal stack arrray with a pointer and have had to set upper bounds of the aray well into the hundreds (999). Being that the number of total bombs keeps going, up I can't think of a way to prevent this self perpetuation.

Do you agree with this logic?

Cadman