You better look sharper at your code because it goes:
int tile = GetInt();
if (tile == 0)
{
break;
}
fprintf(file, "%i\n", tile);
fflush(file);
if (!move(tile))
{
printf("\nIllegal move.\n");
usleep(500000);
}
There is a call of the move function. This function should return true, if the move for the
int tile
is valid. I guess the value should be fetched by some user input.
As I understand your code fragment the move function should also draw on the screen. You better ask the author of the code (and your home work) if something is unclear.