# Game Of Fifteen won't print moves

I have completed functions init; draw; and move. My gameboard draws, but does not draw the move. My logic in move works (I hope) since it returns correct feedback (ie "illegal move" when it is supposed to be), but it will not draw the move.

``````void init(void)
{
// TODO

int k = 1;
for (int i = 0; i <= d - 1; i++)
{
for (int j = 0; j <= d - 1; j++)
{
board[i][j] = d * d - k;
k++;
}
}
board[d-1][d-1] = 0;

if ((d*d -1)%2 != 0)
{
board[d-1][d-3] = 1;
board[d-1][d-2] = 2;

}
}

/**
* Prints the board in its current state.
*/
void draw(void)
{
// TODO
for (int k = 0 ; k <= d-1; k++)
{
for (int l = 0; l <= d-1; l++)
{

if (board[k][l] == 0)
{
printf("  _ ");
}
else
{
printf(" %2d", board[k][l]);
}
}
printf("\n");
}
}

/**
* If tile borders empty space, moves tile and returns true, else
* returns false.
*/
bool move(int tile)
{
// TODO

if (tile < 1 || tile > (d*d-1))
{
return false;
}

for (int m = 0; m <= d-1; m++)
{
for (int n = 0; n <= d-1; n++)
{
if (board[m][n] == tile)
{
int blankspace = 0;
if (board[m -1][n] == blankspace)
{

tile = board[m-1][n];
board[m-1][n] = blankspace;
return true;
}

if (board[m + 1][n] == blankspace)
{

tile = board[m + 1][n];
board[m+1][n] = blankspace;
return true;
}

if (board[m][n - 1] == blankspace)
{

tile = board[m][n-1];
board[m][n-1] = blankspace;
return true;
}
if (board[m][n + 1] == blankspace)
{

tile = board[m][n + 1];
board[m][n + 1] = blankspace;
return true;
}
}
}
}

return false;
}
``````