Haha, that's pretty much the implementation you want - just replace the code in your moveBlock() function with the code I've given you (with small changes).
BoxPos starts at 0. From your code, you have a 10 x 10 array, so ArraySize would be 10. I'm assuming your box starts off at array location [0,0], so array[0,0] = 1.
When you press the key, array[0,0] becomes 0, boxPos is incremented by 1, and array[0,1] becomes 1.
When boxPos is 9, array[0,9] would equal 1. Pressing the key now would make array[0,9] equal 0, boxPos = 10, then array[1,0] equal 1. This is because of the way the / and Mod operators work.
This is the sort of thing you want, isn't it?
BoxPos starts at 0. From your code, you have a 10 x 10 array, so ArraySize would be 10. I'm assuming your box starts off at array location [0,0], so array[0,0] = 1.
When you press the key, array[0,0] becomes 0, boxPos is incremented by 1, and array[0,1] becomes 1.
When boxPos is 9, array[0,9] would equal 1. Pressing the key now would make array[0,9] equal 0, boxPos = 10, then array[1,0] equal 1. This is because of the way the / and Mod operators work.
This is the sort of thing you want, isn't it?
I need a while before the above would start to make sense. :)
Watch this space, I may ask you to explain it again as if you were talking to a retard which by the way I'm not far from. ;)