-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPickupPath.cpp
More file actions
44 lines (37 loc) · 1.29 KB
/
PickupPath.cpp
File metadata and controls
44 lines (37 loc) · 1.29 KB
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
#define _CRT_SECURE_NO_WARNINGS
#include "functions.h"
int main() {
vector<Move> path;
vector<People> redPeople;
vector<People> neutPeople;
vector<Item> obs;
obs.push_back(Item(0, 0, 'F')); // fire
obs.push_back(Item(7, 0, 'H')); // hospital
obs.push_back(Item(7, 3, 'S')); // shelter
Move redStart(Point(7, 2), Point(6, 2));
Move redEnd(Point(6, 1), Point(7, 1));
Move neutStart(Point(7, 1), Point(6, 1));
Move neutEnd(Point(6, 2), Point(7, 2));
int missionNum = 0;
cout << "What mission is this?" << endl;
cin >> missionNum;
if (missionNum != 1) {
fillMission(redPeople, neutPeople, obs);
}
else {
//first mission
fillMission(redPeople, neutPeople, obs, 1);
}
Path redPath = findRedPath(redStart, redPeople, redEnd);
Path neutPath = findNeutPath(neutStart, neutPeople, neutEnd);
setPickupPath(redPath, redPeople);
setPickupPath(neutPath, neutPeople);
printMoves(redPath, missionNum, 'r');
printMoves(neutPath, missionNum, 'n');
cout << "Printing mission " << missionNum << ": \nRed Path" << endl;
printTrack(redPath.getMoves(), redPeople, neutPeople, obs);
cout << endl << "Neutral Path" << endl;
printTrack(neutPath.getMoves(), redPeople, neutPeople, obs);
return 0;
}
//add pickupmoves when creating paths