Hi all. I've been working on making a game like Battleship. I've created a grid and have sprites that can be dragged onto the grid. Please see the link below and you'll see what I'm trying to accomplish.
You can detect the box X and Y by checking if the mouse is over the object, and releasing the mouse button and setting to the object be the same of X and Y of that box. Later, you can also check if the box is empty or filled, etc.