hello,
so i am having some problem
x = 50; y = 31; //declaration from line 1 to 5
lastx = x; lasty = y;
while(1 == 1)
{
gotoxy(lastx, lasty);
printf(" ");
gotoxy(x,y);
printf("**|_A_|**");
a = getch();
lastx = x; lasty = y;
if (a == 77) x = x + 1;
if (a == 75) x = x - 1;
}
//---------------------------------------------------------------------
//i am facing problem here, i have these two codes but when i try to run only the character movement peice of code works, which is above this comment and the rand wont work which is below this comment.
// so please help me how to make them work together, cause its a shooter game.. thanks
while(1 == 1){
gotoxy(x,y);
printf(" ");
x1 = rand() % 3 + 50 ; y1 = 1;
gotoxy(x1,y1);
thanks, though