I have made a mine sweeper game which fully works except for one key point, which is:
Allow the player to place flags on
cells to mark mine locations and to
remove flags. if a cell is marked
with a flag the player can not
activate it by clicking on it.
Now I don’t know how to do this flag requirement.
If you’re asking for a hint on how to do that, a safe way to go is to make the playfield a 2D array and each item of the array an object holding certain information. (In your case that’s probably a boolean telling whether the cell contains a mine and a boolean telling whether the cell is marked or not.)