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
6#include "../TProcuraAdversa.h"
7#include "JogoDoGalo.h"
8#include "JogoEmLinha.h"
9
10int main(int argc, char* argv[])
11{
13
14#ifdef VPL_ATIVO
15 CJogoEmLinha().main(argc, argv, "Jogo Em Linha");
16 return 0;
17#endif
18
19#ifndef MPI_ATIVO
21 "Teste TProcuraAdversa",
22 "1 - Jogo do Galo",
23 "2 - Jogo Em Linha"
24 }, 30, false);
25 int caso = TProcura::NovoValor("\nOpção: ");
26#else
27 // não utilizar o stdin em programas MPI
28 if (argc < 2) {
29 printf("Utilizar o primeiro argumento para identificar o problema:\n\
30Teste TProcuraAdversa\nProblema:\n\
31 1 - Jogo do Galo\n\
32 2 - Jogo Em Linha");
33 return 1;
34 }
35 int caso = atoi(argv[1]);
36 argc--;
37 argv++;
38#endif
39
40 switch (caso) {
41 case 1: CJogoDoGalo().main(argc, argv, "Jogo do Galo"); break;
42 case 2: CJogoEmLinha().main(argc, argv, "Jogo Em Linha"); break;
43 default: printf("Problema não implementado.");
44 }
45}
int main(int argc, char *argv[])
Definition teste.cpp:10
static void MostraCaixa(TVector< TString > titulo, ECaixaParte parte, TVector< int > largura, bool aberta=true, int identacao=0)
Definition TProcura.cpp:368
static int NovoValor(TString prompt)
virtual void main(int argc, char *argv[], TString nome)
Inicializa a interação com o utilizador.
void init_io()
Definition compact.h:14