I am working on a minesweeper program in Java. I have my bombs distributed throughout the field, and I have my actionlisteners responding to clicks and mouselistener, responding to right clicks. I also have each square that is clicked check to see how many bombs are adjacent to it and print the number on the square just like in the game.
The only part I don't understand is how minesweeper opens up field when clicking a square whether it be a number or a blank square. Please help me understand how this works.