-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPeasant.h
42 lines (40 loc) · 1.23 KB
/
Peasant.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
#pragma once
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include "Agent.h"
#include "Castle.h"
#include <list>
#include <memory>
#include "CastleFarmRoute.h"
#include "Farm.h"
class Peasant : public Agent
{
private:
vector<shared_ptr<CastleFarmRoute>> zoneList;
int carrying_stock;
bool currently_working = false;
public:
friend ostream& operator<<(ostream& os, const Peasant& pt);
Peasant(string);
void attack_failed();
Peasant(vector<string> parmaters);
void attack_successful();
virtual void course(int, float);
virtual void set_zone_at(vector<shared_ptr<Zone>> wh) { };
virtual ~Peasant();
virtual string getType(){ return string("Peasant"); }
virtual string getStatus();
virtual void stop() { this->status = Stopped; /*this->speed = 0*/; moving_by_coordinate = false; moving_by_degree = false;}
virtual float getSpeed();
void setRoute(shared_ptr<Farm> farm, shared_ptr<Castle> castle);
void restore_default();
virtual void position(Coordinate, float);
virtual Coordinate getLocation() { return location; }
virtual string getName() { return name; }
vector<shared_ptr<CastleFarmRoute>> getZonePeasantList() { return this->zoneList; }
virtual void go();
void setNextInRoute();
bool isUnpacking();
};