Android Mapping between 2D Array and Grid
<p>I am trying to make a Chess like game in Android which involves 8 X 8 grid. I also have a 8 x 8 two dimensional matrix in the back end and some 64 buttons( 8 X 8) in front end.</p>

<p>My question is that I want one on one correspondence for this matrix and buttons ie.
(a) when I press a button I want to get (i,j) so that I can refer to corresponding matrix entry and</p>

<p>(b) when I have (i,j) values from matrix I can figure out the button to perform some action.</p>

<p>I cant figure out how to map them both. suggestions please.</p>

<p>Thanks</p>
