-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNextMove.h
More file actions
41 lines (31 loc) · 1021 Bytes
/
NextMove.h
File metadata and controls
41 lines (31 loc) · 1021 Bytes
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
//
// Created by Collin Stratton on 4/14/20.
//
#ifndef FANTASYFIGHTINGGAME_NEXTMOVE_H
#define FANTASYFIGHTINGGAME_NEXTMOVE_H
#include <string>
#include <vector>
#include "DirectionPair.h"
using namespace std;
class NextMove { // Class used store data about the description, location, and directions of a given player position
private:
string description;
vector <DirectionPair> newPos;
public:
NextMove(string e) {
description = e;
}
string GetDescription() {return description;}
vector<DirectionPair> GetDirectionPair() { // Returns the the vector DirectionPair
vector<DirectionPair> copy;
for (int i = 0; i < newPos.size(); i++) {copy.push_back(newPos[i]);}
return copy;
}
void ClearPair() {newPos.clear();}
void AddPair(char d, int p) { // Creates a new DirectionPair vector
DirectionPair dp(d, p);
newPos.push_back(dp);
}
void SetDescription(string d) {description = d;}
};
#endif //FANTASYFIGHTINGGAME_NEXTMOVE_H