I am trying to shift the contents of a 2d array down when implementing Tetris in C. This is to move the blocks down. The code works but its not moving elements once only, See the image for the problem(The number in the top left corner is the random number that determines the block type). Any help appreciated. Below is the array shifting code:
//Declare size of board
int board [22][10] = {};
//Shift down
for(i=2;i<20;i++)
{
for(z=1;z<10;z++)
{
board[i+1][z] = board[i][z];
}
}