I am making an invaderz game (nooone take my idea!!!!) im trying to make the top guy move (he wont ) here is the code:
#include <iostream.h>
#include <conio.h>
#include <dos.h>
#include <stdlib.h>
#include <fstream.h>
int x = 10;
int y = 24;
int bx = 1;
int by = 5;
int bux;
int buy;
int lorr = 0;
int bull = 0;
int tmer = 0;
int main()
{
while(1)
{
gotoxy(x, y);
putch('^');
gotoxy(bx, by);
putch('-');
if (tmer == 10)
{
clrscr();
if (bx == 1)
bull = 0;
if (bx == 80)
bull = 1;
if (bull == 1)
bx = bx - 1;
if (bull == 0)
bx = bx + 1;
tmer = 0;
}
if (kbhit)
{
char movement = getch();
if (movement == 27)
break;
}
delay(1);
tmer = tmer + 1;
}
return 0;
}
please dont be shy!