TProcura
Biblioteca em C++ para testes paramétricos de algoritmos, e coleção de algoritmos de procura e otimização
Loading...
Searching...
No Matches
teste.cpp
Go to the documentation of this file.
1
// teste.cpp : programa para teste da classe TProcuraConstrutiva
2
//
3
4
#include <stdio.h>
5
#include <locale>
6
7
#include "../TProcuraAdversa.h"
8
#include "
JogoDoGalo.h
"
9
#include "
JogoEmLinha.h
"
10
11
int
main
(
int
argc,
char
* argv[])
12
{
13
std::locale::global(std::locale(
""
));
14
15
#ifndef MPI_ATIVO
16
printf(
"\n\
17
Teste TProcuraAdversa\nProblema:\n\
18
1 - Jogo do Galo\n\
19
2 - Jogo Em Linha\n\
20
Opção: "
);
21
int
caso =
TProcura::NovoValor
(
""
);
22
#else
23
// não utilizar o stdin em programas MPI
24
if
(argc < 2) {
25
printf(
"Utilizar o primeiro argumento para identificar o problema:\n\
26
Teste TProcuraAdversa\nProblema:\n\
27
1 - Jogo do Galo\n\
28
2 - Jogo Em Linha"
);
29
return
1;
30
}
31
int
caso = atoi(argv[1]);
32
argc--;
33
argv++;
34
#endif
35
36
switch
(caso) {
37
case
1:
CJogoDoGalo
().
main
(argc, argv,
"Jogo do Galo"
);
break
;
38
case
2:
CJogoEmLinha
().
main
(argc, argv,
"Jogo Em Linha"
);
break
;
39
default
: printf(
"Problema não implementado."
);
40
}
41
}
main
int main(int argc, char *argv[])
Definition
teste.cpp:11
JogoDoGalo.h
JogoEmLinha.h
CJogoDoGalo
Definition
JogoDoGalo.h:16
CJogoEmLinha
Definition
JogoEmLinha.h:29
TProcura::NovoValor
static int NovoValor(const char *prompt)
Definition
TProcura.cpp:1158
TProcura::main
virtual void main(int argc, char *argv[], const char *nome)
Inicializa a interação com o utilizador.
Definition
TProcura.cpp:804
Adversa
Teste
teste.cpp
Generated by
1.9.8