Hey there, I was wondering if anyone would be able to provide some help with eventing/possibly scripting. I'd like to know how to make events sense other events without using a heck ton of variables.

So, in this picture, every square is an event. One event would be somehow tagged as a bomb, and non-bombs would show how many bombs are touching it. Is there any way to do this without using, like, 9000 variables, because I'm planning to have an 8x8 grid, and that would be a heck of a lot of variables. Any advice you have would be helpful!
EDIT: There
is a way I could do this using scripting and $game.variables.value = ["ex1, ex2,] At least, I think that would work... But, that would involve a lot of tinkering, like ( I'm gonna simplify this here) if x pos = variable +1 or x pos = variable -1 or x pos = variable and y pos = variable 2 plus one, minus one, or equal to then do this. I mean, I could do that, but there has to be an easier solution!