Repository navigation
Expand file tree
/
Copy pathOrderDriver.cpp
More file actions
49 lines (49 loc) · 1.47 KB
/
Copy pathOrderDriver.cpp
File metadata and controls
49 lines (49 loc) · 1.47 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
44
45
46
47
48
49
//#include "Orders.h"
//
//using namespace std;
//
//int main()
//{
// cout << "test OrderDriver...\n" << endl;
// OrderList anOrderList;
// Deploy *aDeploy=new Deploy;
// Advance *anadvance = new Advance;
// Bomb *abomb = new Bomb;
// Blockade *ablockade = new Blockade;
// Airlift *anairlift = new Airlift;
// Negotiate *anegotiate = new Negotiate;
//
// anOrderList.set_order_list(aDeploy);
// anOrderList.set_order_list(anadvance);
// anOrderList.set_order_list(abomb);
// anOrderList.set_order_list(ablockade);
// anOrderList.set_order_list(anairlift);
// anOrderList.set_order_list(anegotiate);
//
//
// //print orderlist
// cout << "\n the orderlist contains: " << endl;
// for (int i = 0; i < anOrderList.get_order_list()->size(); i++) {
// cout <<" "<< anOrderList.get_order_list()->at(i)->get_type() << endl;
// }
//
// //delete an order
// anOrderList.delete_order(aDeploy);
//
// //print orderlist
// cout << "\n the orderlist contains: " << endl;
// for (int i = 0; i < anOrderList.get_order_list()->size(); i++) {
// cout << " " << anOrderList.get_order_list()->at(i)->get_type() << endl;
// }
//
// //move an order
// anOrderList.move(0,4);
// //anOrderList.move(0, 5);
// anOrderList.move(0, 8);//invalid
// //print orderlist
// cout << "\n the orderlist contains: " << endl;
// for (int i = 0; i < anOrderList.get_order_list()->size(); i++) {
// cout << " " << anOrderList.get_order_list()->at(i)->get_type() << endl;
// }
//
//}