Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <windows.h>
- #include <stdlib.h>
- #include <conio.h>
- #include <stdio.h>
- using namespace std;
- COORD coord={0,0}; // this is global variable
- //center of axis is set to the top left cornor of the screen
- void gotoxy(int x,int y)
- {
- coord.X=x;
- coord.Y=y;
- SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coord);
- }
- int x, y, lastx, lasty, x2, y2;
- int x1, y1, astx, asty;
- char a;
- char ch;
- int main()
- {
- char Z = 254;
- char q, ch1;
- char a = 221, b=219;
- int i;
- char l = 3;
- char hit = getch();
- system("color 13");
- Beep(261,100);
- Beep(293,100);
- Beep(329,100);
- Beep(349,100);
- cout<<" *********** *********** 999999999999999 00000000000000\n";
- Sleep(100);
- cout<<" **** ******* ******* **** 999999999999999 00 00\n";
- Sleep(100);
- cout<<" **** ******** ****** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** ******* ******* **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** ******* ******* **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** ************** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** ******** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** ****** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999 999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999999999999999 00 00\n";
- Sleep(100);
- cout<<" **** **** 999999999999999 0000000000000\n";
- cout<<"\n\n PRESS ENTER TO PLAY";
- cin.ignore();
- system("color 1C");
- Sleep(50);
- system("color 14");
- Sleep(50);
- system("color 15");
- Sleep(50);
- system("color 16");
- Sleep(50);
- system("color 19");
- Sleep(50);
- system("color 14");
- for(q = 0; q<120; q++){
- cout<<a;
- Sleep(60);
- }
- system("CLS");
- //***************************************************************************************************************************************************************
- system("color 27");
- do
- {
- ch1 = getch();
- switch(ch1)
- {
- case 'W':
- case 'w':
- system("CLS");
- system("color 09");
- cout<<" *-=MOD=-* v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n";
- cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- cout<<b<<" --> PLAY " <<b<<endl;
- cout<<b<<" HELP " <<b<<endl;
- cout<<b<<" EXIT " <<b<<endl;
- cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b;
- cin.get();
- case '13':
- cin.ignore();
- system("CLS");
- cout<<" "<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<endl;
- cout<<" "<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- gotoxy(103,1);
- cout<<b<<endl;
- gotoxy(103,2);
- cout<<b<<endl;
- gotoxy(103,3);
- cout<<b<<endl;
- gotoxy(103,4);
- cout<<b<<endl;
- gotoxy(103,5);
- cout<<b<<endl;
- gotoxy(103,6);
- cout<<b<<endl;
- gotoxy(103,7);
- cout<<b<<endl;
- gotoxy(103,8);
- cout<<b<<endl;
- gotoxy(103,9);
- cout<<b<<endl;
- gotoxy(103,10);
- cout<<b<<endl;
- gotoxy(103,11);
- cout<<b<<endl;
- gotoxy(103,12);
- cout<<b<<endl;
- gotoxy(103,13);
- cout<<b<<endl;
- gotoxy(103,14);
- cout<<b<<endl;
- gotoxy(103,15);
- cout<<b<<endl;
- gotoxy(103,16);
- cout<<b<<endl;
- gotoxy(103,17);
- cout<<b<<endl;
- gotoxy(103,18);
- cout<<b<<endl;
- gotoxy(103,19);
- cout<<b<<endl;
- gotoxy(103,20);
- cout<<b<<endl;
- gotoxy(103,21);
- cout<<b<<endl;
- gotoxy(103,22);
- cout<<b<<endl;
- gotoxy(103,23);
- cout<<b<<endl;
- gotoxy(103,24);
- cout<<b<<endl;
- gotoxy(103,25);
- cout<<b<<endl;
- gotoxy(103,26);
- cout<<b<<endl;
- gotoxy(103,27);
- cout<<b<<endl;
- gotoxy(103,28);
- cout<<b<<endl;
- gotoxy(103,29);
- cout<<b<<endl;
- gotoxy(103,30);
- cout<<b<<endl;
- gotoxy(103,31);
- cout<<b<<endl;
- gotoxy(2,34);
- cout<<" LIVES:"<<l<<l<<l<<endl;
- gotoxy(2,36);
- cout<<" SCORE: ---";
- x = 50; y = 31;
- lastx = x; lasty = y;
- x2 = lastx; y2 = lasty;
- while(2 == 2)
- {
- 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;
- }
- while(1 == 1){
- gotoxy(x,y);
- printf(" ");
- x1 = rand() % 3 + 50 ; y1 = 1;
- gotoxy(x1,y1);
- std::cout<<"|"<<Z<<"|";
- Sleep(500);
- }
- if(hit == ' '){
- while(true){
- gotoxy(x,y);
- printf(" ");
- x2; y2 = lasty + 1;
- printf("^");
- Sleep(200);
- }
- }
- break;
- break;
- case 'E':
- case 'e':
- system("CLS");
- system("color 02");
- cout<<" *-=MOD=-* v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n";
- cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- cout<<b<<" PLAY " <<b<<endl;
- cout<<b<<" --> HELP " <<b<<endl;
- cout<<b<<" EXIT " <<b<<endl;
- cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- case '13':
- cin.ignore();
- system("CLS");
- cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- cout<<" *-=INSTRUCTIONS=-*\n";
- cout<<" ______________\n\n\n\n\n";
- system("color 06");
- cout<<" The asteroids are falling from the sky, The fate of Earth depends on you.";
- cout<<"\n Destroy the Asteroids before they reach the end!";
- cout<<"\n\n LET THE GAMES BEGIN";
- cout<<"\n\n\n CONTROLS\n\n";
- cout<<" <-- (RIGHT ARROW) - Ship goes right\n";
- cout<<" --> (LEFT ARROW) - Ship goes left\n";
- cout<<" == (SPACE) - Ship shoots\n";
- cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- break;
- break;
- case 'R':
- case 'r':
- system("CLS");
- system("color 0C");
- cout<<" *-=MOD=-* v1.0\n\n\n\n\n\n\n\n\n\n\n\n\n";
- cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- cout<<b<<" PLAY " <<b<<endl;
- cout<<b<<" HELP " <<b<<endl;
- cout<<b<<" --> EXIT " <<b<<endl;
- cout<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<b<<endl;
- break;
- }
- }while (ch != 'Q' && ch!='q');
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement