-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBoard.h
30 lines (28 loc) · 856 Bytes
/
Board.h
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
#pragma once
#include "Move.h"
#include <vector>
using namespace std;
class Board
{
public:
int n, m;
vector<vector<char>> config;
Board(int nin, int min);
Board();
vector<Move> validMoves(bool side);
void reverseBoard();
bool positionIsValid(pair<int, int> pos);
bool checkEnemy(pair<int, int> targetPos);
bool checkSoldier(pair<int, int> targetPos);
bool checkTownhall(pair<int, int> targetPos);
bool checkGoal(pair<int, int> targetPos);
bool checkEmpty(pair<int,int> targetPos);
bool checkSoldierOrTownhall(pair<int, int> targetPos);
bool checkEnemyOrGoal(pair<int, int> targetPos);
void printBoard();
pair<int,int> countEnemies();
bool isTerminal(bool side);
int utilityScore();
int heuristicScore();
tuple<int, int, int, int, int, int, int, int, int, int, int> cannonsAndSoldierAttacks(bool side);
};