-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMap.h
52 lines (32 loc) · 1010 Bytes
/
Map.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//
// Created by acasali on 27/11/16.
//
#ifndef LEGENDS_OF_WESTEROS_MAP_H
#define LEGENDS_OF_WESTEROS_MAP_H
#include <vector>
#include "Territory.h"
typedef double typeElem;
using namespace std;
class Map {
public:
Map();
//Map(int r, int c);
void show();
Territory readTerritory(int r, int c);
void writeTerritory(int r, int c, Territory val);
int getRow() const {
return rows;
}
int getColumn() const {
return columns;
}
bool conquer(int invaderRow, int invaderColumn, int defenderRow, int defenderColumn);
private:
int rows;
int columns;
Territory matrix[4][8];
float calculateStrength(int initialRow, int initialColumn, bool isInvader);
float calculateStrengthRecursive(int initialRow, int initialColumn, bool isInvader, vector<vector<bool>> &calculatedMat);
int controlledCall(int row, int col, bool isInvader, string armyName, vector<vector<bool>> &calculatedMat);
};
#endif //LEGENDS_OF_WESTEROS_MAP_H