I understand your code, but my problem is that I use one big canvas, not little TImages. I need a code which copies a picture on my canvas.
You will need to directly modify the image each time. based on the response you have gotten, I don't think there is an easy way to do that without a pixel by pixel operation.
I'm pretty new to OOP. ...
the OOP way is to divide or and conquer. as you see by my code, each image ends up calling the same code. All of my images used the same "on click" event and simply pass "self" as the parameter to the posted code.
if not SquareUsed(sender) then PlaceX(sender) is the basic code once I figure out X or O's turn
If I were to do the mine sweeper game, I would create the timages at run time so the grid can be changed by the user.
I use the TImage's tag to store the status of each square. You can do the same thing to store your bomb count and if it has been clicked yet of not.
when you create all of your timages, you can set them as an array or you can add them to an array of pointer to tmiages so your code can scan the list quickly. just remember to set the parent link so you well get the hooks you need for the click and redraw to be handled automatically