Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <time.h>
- #include <vector>
- #define IZQUIERDA 75
- #define DERECHA 77
- #define DISPARO 32
- #define ALEATORIO(INI,FIN) rand()% (FIN-INI+1)+INI
- using namespace std;
- using namespace System;
- int vidas = 3;
- struct nave {
- short x;
- short y;
- char imagen[2][5] = { { ' ', 'm', 'A', 'm', ' ' },
- { 'M', 'A', 'Z', 'A', 'M' } };
- short balas;
- nave(short _x = 30, short _y = 27, short _balas = 50) {
- x = _x;
- y = _y;
- balas = _balas;
- }
- void mover(char tecla) {
- switch (tecla) {
- case IZQUIERDA: if (x>1) x -= 3; break;
- case DERECHA: if (x<87) x += 3; break;
- }
- }
- void borrar() {
- for (int i = 0; i < 2; i++) {
- for (int j = 0; j < 5; j++) {
- Console::SetCursorPosition(x + j, y + i);
- cout << " ";
- }
- }
- }
- void dibujar() {
- for (int i = 0; i < 2; i++) {
- for (int j = 0; j < 5; j++) {
- Console::ForegroundColor = ConsoleColor::Red;
- Console::SetCursorPosition(x + j, y + i);
- cout << imagen[i][j];
- }
- }
- }
- void animar(char _tecla) {
- borrar();
- mover(_tecla);
- dibujar();
- }
- };
- struct avispa {
- int retraso;
- short x;
- short y;
- short balas;
- short dx, dy;
- avispa(short _x = 10, short _y = 10) {
- x = _x;
- y = _y;
- dx = 1;
- dy = 1;
- retraso = 0;
- }
- ~avispa() {
- Console::SetCursorPosition(x, y);
- cout << " ";
- }
- void animar() {
- if (retraso == 500) {
- Borrar();
- Mover();
- Dibujar();
- retraso = 0;
- }
- retraso++;
- }
- void animar2() {
- if (retraso == 500) {
- Borrar();
- Mover2();
- Dibujar();
- retraso = 0;
- }
- retraso++;
- }
- void Mover() {
- if (x == 0) dx *= -1;
- if (x == 21) dx *= -1;
- if (y == 5) dy *= -1;
- if (y == 18) dy *= -1;
- x += dx;
- y += dy;
- }
- void Mover2() {
- if (x == 60) dx *= -1;
- if (x == 80) dx *= -1;
- if (y == 5) dy *= -1;
- if (y == 18) dy *= -1;
- x += dx;
- y += dy;
- }
- void Borrar() {
- Console::SetCursorPosition(x, y);
- cout << " ";
- }
- void Dibujar() {
- Console::ForegroundColor = ConsoleColor::Blue;
- Console::SetCursorPosition(x, y);
- cout << "A";
- }
- };
- struct mariposa {
- int retraso;
- short x;
- short y;
- short dx, dy;
- mariposa(short _x = 10, short _y = 10) {
- x = _x;
- y = _y;
- dx = 1;
- dy = 1;
- retraso = 0;
- }
- ~mariposa() {
- Console::SetCursorPosition(x, y);
- cout << " ";
- }
- void animar() {
- if (retraso == 500) {
- Borrar();
- Mover();
- Dibujar();
- retraso = 0;
- }
- retraso++;
- }
- void Mover() {
- if (x == 20 || x == 60) {
- dx *= -1;
- y += dy;
- if (y == 4 || y == 20) { dy *= -1; }
- }
- x += dx;
- }
- void Borrar() {
- Console::SetCursorPosition(x, y);
- cout << " ";
- }
- void Dibujar() {
- Console::ForegroundColor = ConsoleColor::Cyan;
- Console::SetCursorPosition(x, y);
- cout << "M";
- }
- };
- typedef struct comandante {
- int vc = 2;
- short x;
- short y;
- int pasos;
- short dx;
- short dy;
- short retraso;
- int xbala;
- int ybala;
- int dybala;
- short retraso1 = 0;
- int disparar;
- char img;
- int vida = 2;
- comandante(short a = 5, short b = 5, short c = 0) {
- img = 'C';
- x = a;
- y = b;
- pasos = c;
- dx = 1;
- dy = 1;
- retraso = 0;
- xbala = x;
- ybala = y;
- dybala = 1;
- }
- ~comandante() {
- borrar();
- Console::SetCursorPosition(xbala, ybala);
- cout << " ";
- }
- void animar(nave* &personajeA) {
- if (retraso == 500) {
- borrar();
- mover();
- restriccion();
- dibujar();
- animarBala(personajeA);
- if (ybala == 29) {
- borrarBala();
- }
- retraso = 0;
- }
- retraso++;
- }
- void dibujar() {
- if (vida == 2) {
- Console::ForegroundColor = ConsoleColor::Green;
- Console::SetCursorPosition(x, y);
- cout << img;
- }
- else
- {
- Console::ForegroundColor = ConsoleColor::DarkMagenta;
- Console::SetCursorPosition(x, y);
- cout << img;
- }
- }
- void borrar() {
- if(vida == 2) {
- Console::SetCursorPosition(x, y);
- cout << " ";
- }
- if (vida == 1) {
- Console::SetCursorPosition(x, y);
- cout << " ";
- }
- }
- void mover() {
- if (x == 20 || x == 90) {
- dx *= -1;
- }
- x += dx;
- }
- void restriccion() {
- if (x == -1) {
- x = 0;
- }
- else if (x == 120) {
- x = 119;
- }
- else if (y == -1) {
- y = 0;
- }
- else if (y == 35) {
- y = 34;
- }
- }
- void crearBala() {
- Console::SetCursorPosition(xbala, ybala);
- cout << "*";
- }
- void crearBala2() {
- Console::SetCursorPosition(xbala, ybala);
- cout << "o";
- }
- void borrarBala() {
- Console::SetCursorPosition(xbala, ybala);
- cout << " ";
- }
- void animarBala(nave* &personajeA) {
- borrarBala();
- if (ybala == 29) {
- disparar = ALEATORIO(30, 60);
- }
- if (ybala == 29) {
- borrarBala();
- }
- if (ybala < 29) {
- ybala += dybala;
- }
- if (x == disparar) {
- xbala = x;
- ybala = y;
- }
- if (!(xbala == 5)) {
- crearBala();
- }
- if (ybala != 29 || x) {
- if (xbala == personajeA->x && ybala == personajeA->y || xbala == personajeA->x + 1 && ybala == personajeA->y || xbala == personajeA->x + 2 && ybala == personajeA->y || xbala == personajeA->x + 3 && ybala == personajeA->y || xbala == personajeA->x + 4 && ybala == personajeA->y || xbala == personajeA->x + 5 && ybala == personajeA->y) {
- vidas--;
- }
- }
- }
- };
- struct bala {
- int x;
- int y;
- bala(int _x = 10, int _y = 10) {
- x = _x;
- y = _y;
- }
- void dibujar() {
- Console::ForegroundColor = ConsoleColor::Red;
- Console::SetCursorPosition(x, y);
- cout << "*";
- }
- void borrar() {
- Console::SetCursorPosition(x, y);
- cout << " ";
- }
- void mover() {
- y--;
- }
- void morir(vector<comandante*> &comandante1, vector<avispa*> &avispa1, vector<avispa*> &avispa2, vector<mariposa*> &mariposa1, int &puntaje) {
- for (int e = 0; e < comandante1.size(); e++) {
- if (x == comandante1[e]->x + 1 && y == comandante1[e]->y) {
- comandante1[e]->vida--;
- if (comandante1[e]->vida == 0) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- puntaje += 400;
- }
- }
- }
- for (int e = 0; e < avispa1.size(); e++) {
- if (x == avispa1[e]->x + 1 && y == avispa1[e]->y) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- puntaje += 100;
- }
- }
- for (int e = 0; e < avispa2.size(); e++) {
- if (x == avispa2[e]->x + 1 && y == avispa2[e]->y) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- puntaje += 100;
- }
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- if (x == mariposa1[e]->x + 1 && y == mariposa1[e]->y) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- puntaje += 160;
- }
- }
- }
- void animar(vector<comandante*> &comandante1, vector<avispa*> &avispa1, vector<avispa*> &avispa2, vector<mariposa*> &mariposa1, int &puntaje) {
- borrar();
- mover();
- dibujar();
- morir(comandante1, avispa1, avispa2, mariposa1, puntaje);
- }
- };
- bool colision(int &xB, int &yB, int x, int y) {
- if (xB == x && yB == y) {
- return true;
- }
- else {
- return false;
- }
- }
- void tabla(int &puntaje, nave* &n) {
- Console::SetCursorPosition(90, 1);
- Console::ForegroundColor = ConsoleColor::White;
- cout << "PUNTAJE = " << puntaje;
- Console::SetCursorPosition(90, 2);
- Console::ForegroundColor = ConsoleColor::White;
- cout << "VIDAS = " << vidas;
- if (vidas == 1 || vidas == 2) {
- n->dibujar();
- }
- }
- void jugar() {
- nave* n = new nave[1];
- int retraso1 = 0;
- int retraso = 0;
- n->dibujar();
- vector<bala*> balas;
- vector<avispa*> avispa1;
- vector<avispa*> avispa2;
- vector<mariposa*> mariposa1;
- vector<comandante*>comandante1;
- int cantE = 24;
- int puntaje = 0;
- bool continuar = true;
- bool continuar1 = true;
- bool continuar2 = true;
- bool continuar3 = true;
- for (int i = 0; i < 2; i++) {
- int x = ALEATORIO(2, 17);
- int y = ALEATORIO(6, 16);
- avispa1.push_back(new avispa(x, y));
- }
- for (int i = 0; i < 2; i++) {
- int x = ALEATORIO(65, 76);
- int y = ALEATORIO(6, 16);
- avispa2.push_back(new avispa(x, y));
- }
- for (int i = 0; i < 4; i++) {
- int x1 = ALEATORIO(22, 56);
- int y1 = ALEATORIO(5, 17);
- mariposa1.push_back(new mariposa(x1, y1));
- }
- for (int i = 0; i < 4; i++) {
- int x1 = ALEATORIO(21, 58);
- int y1 = ALEATORIO(3, 5);
- comandante1.push_back(new comandante(x1, y1));
- }
- while (continuar) {
- if (retraso1 == 300) {
- tabla(puntaje,n);
- retraso1 = 0;
- }
- if (puntaje >= 2500) {
- continuar = false;
- for (int e = 0; e < comandante1.size(); e++) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa1.size(); e++) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa2.size(); e++) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- }
- }
- if (vidas == 0) {
- continuar = false;
- system("cls");
- cout << "PERDISTE!";
- for (int e = 0; e < comandante1.size(); e++) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa1.size(); e++) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa2.size(); e++) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- }
- _getch();
- exit(0);
- }
- retraso1++;
- if (kbhit()) {
- char tecla = getch();
- if (tecla == DISPARO) {
- balas.push_back(new bala(n->x + 2, n->y - 1));
- }
- n->animar(tecla);
- }
- for (int i = 0; i < avispa1.size(); i++) {
- avispa1[i]->animar();
- }
- for (int i = 0; i < avispa2.size(); i++) {
- avispa2[i]->animar2();
- }
- for (int i = 0; i < mariposa1.size(); i++) {
- mariposa1[i]->animar();
- }
- for (int i = 0; i < comandante1.size(); i++) {
- comandante1[i]->animar(n);
- }
- for (int i = 0; i < balas.size(); i++, retraso++) {
- if (retraso == 300) {
- if (balas[i]->y != 2) {
- balas[i]->animar(comandante1, avispa1, avispa2, mariposa1, puntaje);
- if (balas[i]->y == 2) {
- balas[i]->borrar();
- delete balas[i];
- balas.erase(balas.begin() + i);
- i--;
- }
- retraso = 0;
- }
- }
- }
- }
- system("cls");
- cout << "NIVEL 2" << endl;
- _getch();
- system("cls");
- for (int i = 0; i < 4; i++) {
- int x = ALEATORIO(2, 17);
- int y = ALEATORIO(6, 16);
- avispa1.push_back(new avispa(x, y));
- }
- for (int i = 0; i < 4; i++) {
- int x = ALEATORIO(65, 76);
- int y = ALEATORIO(6, 16);
- avispa2.push_back(new avispa(x, y));
- }
- for (int i = 0; i < 6; i++) {
- int x1 = ALEATORIO(22, 56);
- int y1 = ALEATORIO(5, 17);
- mariposa1.push_back(new mariposa(x1, y1));
- }
- for (int i = 0; i < 6; i++) {
- int x1 = ALEATORIO(21, 58);
- int y1 = ALEATORIO(3, 5);
- comandante1.push_back(new comandante(x1, y1));
- }
- while (continuar1) {
- if (retraso1 == 300) {
- tabla(puntaje, n);
- retraso1 = 0;
- }
- if (puntaje >= 5000) {
- continuar1 = false;
- for (int e = 0; e < comandante1.size(); e++) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa1.size(); e++) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa2.size(); e++) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- }
- }
- if (vidas == 0) {
- continuar1 = false;
- system("cls");
- cout << "PERDISTE!";
- for (int e = 0; e < comandante1.size(); e++) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa1.size(); e++) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa2.size(); e++) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- }
- _getch();
- exit(0);
- }
- retraso1++;
- if (kbhit()) {
- char tecla = getch();
- if (tecla == DISPARO) {
- balas.push_back(new bala(n->x + 2, n->y - 1));
- }
- n->animar(tecla);
- }
- for (int i = 0; i < avispa1.size(); i++) {
- avispa1[i]->animar();
- }
- for (int i = 0; i < avispa2.size(); i++) {
- avispa2[i]->animar2();
- }
- for (int i = 0; i < mariposa1.size(); i++) {
- mariposa1[i]->animar();
- }
- for (int i = 0; i < comandante1.size(); i++) {
- comandante1[i]->animar(n);
- }
- for (int i = 0; i < balas.size(); i++, retraso++) {
- if (retraso == 300) {
- if (balas[i]->y != 2) {
- balas[i]->animar(comandante1, avispa1, avispa2, mariposa1, puntaje);
- if (balas[i]->y == 2) {
- balas[i]->borrar();
- delete balas[i];
- balas.erase(balas.begin() + i);
- i--;
- }
- retraso = 0;
- }
- }
- }
- }
- system("cls");
- cout << "NIVEL 3" << endl;
- _getch();
- system("cls");
- for (int i = 0; i < 2; i++) {
- int x = ALEATORIO(2, 17);
- int y = ALEATORIO(6, 16);
- avispa1.push_back(new avispa(x, y));
- }
- for (int i = 0; i < 2; i++) {
- int x = ALEATORIO(65, 76);
- int y = ALEATORIO(6, 16);
- avispa2.push_back(new avispa(x, y));
- }
- for (int i = 0; i < 4; i++) {
- int x1 = ALEATORIO(22, 56);
- int y1 = ALEATORIO(5, 17);
- mariposa1.push_back(new mariposa(x1, y1));
- }
- for (int i = 0; i < 4; i++) {
- int x1 = ALEATORIO(21, 58);
- int y1 = ALEATORIO(3, 5);
- comandante1.push_back(new comandante(x1, y1));
- }
- while (continuar2) {
- if (retraso1 == 300) {
- tabla(puntaje, n);
- retraso1 = 0;
- }
- if (puntaje >= 7500) {
- continuar2 = false;
- for (int e = 0; e < comandante1.size(); e++) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa1.size(); e++) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa2.size(); e++) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- }
- }
- if (vidas == 0) {
- continuar2 = false;
- system("cls");
- cout << "PERDISTE!";
- for (int e = 0; e < comandante1.size(); e++) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa1.size(); e++) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa2.size(); e++) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- }
- _getch();
- exit(0);
- }
- retraso1++;
- if (kbhit()) {
- char tecla = getch();
- if (tecla == DISPARO) {
- balas.push_back(new bala(n->x + 2, n->y - 1));
- }
- n->animar(tecla);
- }
- for (int i = 0; i < avispa1.size(); i++) {
- avispa1[i]->animar();
- }
- for (int i = 0; i < avispa2.size(); i++) {
- avispa2[i]->animar2();
- }
- for (int i = 0; i < mariposa1.size(); i++) {
- mariposa1[i]->animar();
- }
- for (int i = 0; i < comandante1.size(); i++) {
- comandante1[i]->animar(n);
- }
- for (int i = 0; i < balas.size(); i++, retraso++) {
- if (retraso == 300) {
- if (balas[i]->y != 2) {
- balas[i]->animar(comandante1, avispa1, avispa2, mariposa1, puntaje);
- if (balas[i]->y == 2) {
- balas[i]->borrar();
- delete balas[i];
- balas.erase(balas.begin() + i);
- i--;
- }
- retraso = 0;
- }
- }
- }
- }
- system("cls");
- cout << "NIVEL 3" << endl;
- _getch();
- system("cls");
- for (int i = 0; i < 4; i++) {
- int x = ALEATORIO(2, 17);
- int y = ALEATORIO(6, 16);
- avispa1.push_back(new avispa(x, y));
- }
- for (int i = 0; i < 4; i++) {
- int x = ALEATORIO(65, 76);
- int y = ALEATORIO(6, 16);
- avispa2.push_back(new avispa(x, y));
- }
- for (int i = 0; i < 6; i++) {
- int x1 = ALEATORIO(22, 56);
- int y1 = ALEATORIO(5, 17);
- mariposa1.push_back(new mariposa(x1, y1));
- }
- for (int i = 0; i < 6; i++) {
- int x1 = ALEATORIO(21, 58);
- int y1 = ALEATORIO(3, 5);
- comandante1.push_back(new comandante(x1, y1));
- }
- while (continuar3) {
- if (retraso1 == 300) {
- tabla(puntaje, n);
- retraso1 = 0;
- }
- if (puntaje >= 10000) {
- continuar3 = false;
- for (int e = 0; e < comandante1.size(); e++) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa1.size(); e++) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa2.size(); e++) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- }
- system("cls");
- cout << "GANASTE!";
- _getch();
- }
- if (vidas == 0) {
- continuar3 = false;
- system("cls");
- cout << "PERDISTE!";
- for (int e = 0; e < comandante1.size(); e++) {
- delete comandante1[e];
- comandante1.erase(comandante1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa1.size(); e++) {
- delete avispa1[e];
- avispa1.erase(avispa1.begin() + e);
- e--;
- }
- for (int e = 0; e < avispa2.size(); e++) {
- delete avispa2[e];
- avispa2.erase(avispa2.begin() + e);
- e--;
- }
- for (int e = 0; e < mariposa1.size(); e++) {
- delete mariposa1[e];
- mariposa1.erase(mariposa1.begin() + e);
- e--;
- }
- _getch();
- exit(0);
- }
- retraso1++;
- if (kbhit()) {
- char tecla = getch();
- if (tecla == DISPARO) {
- balas.push_back(new bala(n->x + 2, n->y - 1));
- }
- n->animar(tecla);
- }
- for (int i = 0; i < avispa1.size(); i++) {
- avispa1[i]->animar();
- }
- for (int i = 0; i < avispa2.size(); i++) {
- avispa2[i]->animar2();
- }
- for (int i = 0; i < mariposa1.size(); i++) {
- mariposa1[i]->animar();
- }
- for (int i = 0; i < comandante1.size(); i++) {
- comandante1[i]->animar(n);
- }
- for (int i = 0; i < balas.size(); i++, retraso++) {
- if (retraso == 300) {
- if (balas[i]->y != 2) {
- balas[i]->animar(comandante1, avispa1, avispa2, mariposa1, puntaje);
- if (balas[i]->y == 2) {
- balas[i]->borrar();
- delete balas[i];
- balas.erase(balas.begin() + i);
- i--;
- }
- retraso = 0;
- }
- }
- }
- }
- }
- void hola() {
- for (int i = 20; i > 7; i--) {
- Console::SetCursorPosition(10, i);
- Console::ForegroundColor = ConsoleColor::Red;
- cout << "*";
- _sleep(77);
- }
- for (int i = 10; i < 16; i++) {
- Console::SetCursorPosition(i, 15);
- Console::ForegroundColor = ConsoleColor::Red;
- cout << "*";
- _sleep(77);
- }
- for (int i = 20; i > 7; i--) {
- Console::SetCursorPosition(15, i);
- Console::ForegroundColor = ConsoleColor::Red;
- cout << "*";
- _sleep(77);
- }
- for (int i = 20; i > 12; i--) {
- Console::SetCursorPosition(18, i);
- Console::ForegroundColor = ConsoleColor::Red;
- cout << "*";
- _sleep(77);
- }
- Console::SetCursorPosition(25, 10);
- Console::ForegroundColor = ConsoleColor::Red;
- cout << "HOLA";
- _sleep(700);
- Console::SetCursorPosition(35, 5);
- Console::ForegroundColor = ConsoleColor::Red;
- cout << "PROFESOR";
- _sleep(700);
- Console::SetCursorPosition(55, 9);
- Console::ForegroundColor = ConsoleColor::Red;
- cout << ":D";
- _sleep(700);
- system("cls");
- }
- int main() {
- hola();
- srand(time(NULL));
- Console::CursorVisible = false;
- jugar();
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement