I'm working on a simple board game using Appcelerator Titanium for iPhone (javascript - not that it matters for this question really).
My problem isn't really language-specific, it's more of a general programming and math question.
I have a grid of "cells" that is 10 columns by 10 rows (100 cells). It's a board game, like checkers/draughts.
Starting at the top and moving downward, the rows are labeled 'A' through 'J'
Starting at the left and moving right, the columns are labeled '0' through '9'
Each cell is 32x32 (pixels).
I can drag a token onto/over the grid and when I release, it reports to me the x/y coordinates of where I released, eg: 124,302. I have these coords available to me in variables.
So my question is, how do I determine the center point of the cell that I released over, so I can center the token in that cell?
Any ideas on how to accomplish this?