-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
46 lines (38 loc) · 1.67 KB
/
main.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
/*#######################################################################
# #
# Universidade Federal do Espírito Santo #
# INF09324 Programação Aplicada de Computadores 2021/1 #
# Primeiro trabalho #
# #
# Aluno: 2020205193 Felipe Pereira Umpierre #
# Professor: Rodrigo Martins de Siqueira Barbosa #
# Entrega: 01/09/2021 #
# #
# Como utilizar: USO.pdf ou USO.md #
# Sobre o desenvolvimento: DESENVOLVIMENTO.pdf ou DESENVOLVIMENTO.md #
# #
#######################################################################*/
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
#include "interface.h"
#include "jogo.h"
#include "partida.h"
int main(int argc, char *argv[]) {
std::string nomeArquivo;
//Inicializa a interface
Interface interface;
//Pega o nome do arquivo pelo terminal, se informado, ou do menu de opções
if (argc > 1) {
nomeArquivo = argv[1];
} else {
nomeArquivo = interface.selecionarArquivo();
}
//Inicializa a partida com o nome do arquivo a ser lido
Partida partida(nomeArquivo, &interface);
//Prepara e começa o jogo
partida.preparar();
partida.comecar();
return 0;
}