I might be trying this game in a dumb way.I am not using Arrays as I didn't find it comfortable enough to though I understand Arrays.
Please see this game ...and help me calculate the values in the adjacent squares of the matrices.
<img src="http://pinastro.files.wordpress.com/2012/07/11.jpg" border="0" />
<img src="http://pinastro.files.wordpress.com/2012/07/21.jpg" border="0" />
how do i calculate the values of the adjacent matrices ???
without the use of arrays....
if my method is totally flawed ..tell me an alternative
Surely arrays are the way to go? Representing a 2D matrix as a 2D array is the natural implementation. Any alternative representation would end up looking like an array anyway. So why would you not want to use arrays?
Develop games in your browser. Powerful, performant & highly capable.
Argh, Tom! This thing ate my post again!
*grumble* Now, what was I saying... ah, yes.
Without arrays, it would be difficult. You could create additional invisible sprites with collision mask that matches adjacent areas. Just get picked squares' values and do the math with them.
However, I wouldn't recommend this if you plan to do the maths like this every tick. Go with array in that case.