terminada adaptacao para Porto Alegre
[xYpjg3TdSw.git] / migrando / MinimaxEnemy.h
blobd8585b3f06b3bc0b36d1762b0149eedd872b8463
1 #ifndef __MINIMAX_ENEMY_H__
2 #define __MINIMAX_ENEMY_H__
4 #include "Enemy.h"
5 #include "Board.h"
7 #include <ctime>
8 #include <cstdlib>
9 //#include <iostream>
10 //using namespace std;
12 class MinimaxEnemy: public Enemy
14 public:
15 MinimaxEnemy(bool player, int minimaxDepth): Enemy(player, minimaxDepth), _game_boards(board_compare) {}
16 void move(Board *board, int& fromX, int& fromY, int& toX, int& toY);
17 int alphabeta(Board board, int depth, int alpha, int beta, int player);
18 virtual
19 int heuristica(Board board, bool player);
20 virtual void undo(Board *board) {
21 _game_boards.erase(board->to_comp());
23 for(Board::Set::iterator i = _game_boards.begin(); i != _game_boards.end(); ++i) {
24 cout << i->first << ' ' << i->second << endl;
26 cout << endl;//*/
28 protected:
29 int _choice;
30 Board::Set _game_boards;
33 #endif