#include #include //Clear Screen... clrscr() #include //for delay() char kybd; //to store a keystroke pressed char GameOver; //is 'y' or 'n', means ended or not int shipx, shipy; //position of ship int shiplife; //if shiplife is 0, game over int jetx, jety; //position of jet int jetlife; //if jetlife is 0, game over too void get_input() { kybd=getch(); } void do_process() { } void give_output() { clrscr(); if(shiplife>0) { gotoxy(shipx, shipy); cout<<"^"; } if(jetlife>0) { gotoxy(jetx,jety); cout<<"v"; } } void main() { clrscr(); shipx=40; shipy=23; shiplife=1; jetx=20; jety=2; jetlife=1; GameOver='n'; //Game is not over yet at the beginning.. while (GameOver!='y') { get_input(); do_process(); give_output(); } }