i made the structure of the board and positioned the blocks on their initial position. just coding for moving them is left. i just ask that question to enhance my knowlegde as i was not getting my desired results but know i am using two different arrays one for x axis and one for y axis and now it is giving me desired result moreover i am not stuck yet.