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.
Everything works basically but the code seems too complex and repetitive. Does anyone have any ideas on how to simplify? Or a different way to do it?