-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
33 lines (24 loc) · 746 Bytes
/
main.cpp
File metadata and controls
33 lines (24 loc) · 746 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <iostream>
#include "juego/juego.h"
using namespace std;
int main() {
srand((unsigned)time(NULL)); // Semilla para generar números aleatorios.
Juego* juego = new Juego();
juego -> cargar_objetivos();
juego -> crear_juego();
bool nueva_partida = true;
int archivos_cargados = 0;
juego -> leer_archivos(archivos_cargados, nueva_partida);
if (archivos_cargados == CONTINUAR_PARTIDA) {
if (nueva_partida) {
juego -> elegir_opcion_menu_np();
}
juego -> llover();
juego -> jugar_partida();
}
else {
cout << ERROR_COLOR << "No se pudieron abrir uno o varios archivos." << END_COLOR << endl;;
}
delete juego;
return 0;
}