heurísticas no relatório
[xYpjg3TdSw.git] / main.cpp
blob7532306c0612bc1ffb441c5eb430237c853b279b
1 /* Trabalho final da disciplina de Inteligência Artificial
2 Autores: Kauê Silveira - 171671 & Bruno Fiss - 171359
3 */
5 #include "Game.h"
6 #include "Controller.h"
7 #include "Window.h"
9 #include <cstdio>
10 #include <stdlib.h>
11 #include <cassert>
13 #define DO_GENETICS true
15 int main(int argc, char **argv)
17 setbuf(stdout, NULL);
18 Game *game = new Game();
19 Controller *controller = new Controller(game, DO_GENETICS);
20 Window *window = new Window(argc, argv, controller);
21 controller->set_window(window);
22 if(argc > 1) {
23 FILE *in = fopen(argv[1], "r");
24 assert(in);
25 printf("loading from file %s...\n", argv[1]);
26 controller->load(in);
27 printf("done!\n");
29 if(0) {
30 //controller->play();
31 while(game->think()) {
32 if(game->is_end()) {
33 printf("endgame\n");
34 break;
37 } else {
38 window->main_loop();
40 return 0;