how can i move the enemies with out disturbing the dots... should i make an array for dots.. or anything else .. i am new in C .. please help me


void printEnemy(void)
{
//Ex and Ey are the x and y coordinates of Enemy respectively
//x and y are the x and y coordinates of pacman

if(Ex==76)
{
gotoxy(Ex,Ey);
printf(" ");
Ex=5;
gotoxy(Ex,Ey);
}
if(Ex==x && Ey==y)
{
printf("Game");
ctr=1;
}

if(Ex!=1 && Ex>x && Ey==y)
{
movetext(Ex-1,Ey,Ex-1,Ey,Ex+1,Ey);
gotoxy(Ex,Ey);
printf("\x01");
Ex--;
}
else {
if(Ex==74)
{
gotoxy(73,5);
printf(".");
Ex=5;
}
else{
movetext(Ex+1,Ey,Ex+1,Ey,Ex-1,Ey);
gotoxy(Ex,Ey);
printf("\x01");
}
Ex++;
}
}