Well done and congratulations!
I think you can keep your version and work with it.
But let me explain what I would do the next time you start a big project like this please.
At the moment you have a lot of lines that are very similar where you check the cells of the grid.
Also you have positions in the text statements where you show the cells and where you check the mouse position against it. These are redundant position information.
When writing a program you would make a data structure (array of class/objects) to have the information in one place.
Then you don’t need a lot of similar lines with if but can for loop over the array to access all cells in the grid.
I and kll tried to demonstrate a bit of that in my post.
Chrisir