-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCity.h
35 lines (30 loc) · 812 Bytes
/
City.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
#pragma once
#include<string>
#include<vector>
class City
{
private:
int id;
int xPosition;
int yPosition;
std::string name; // nie u¿ywane w tym momencie, ale mog³oby byæ przydatne przy ew. rozszerzaniu
int lootValue; // bogactwo mo¿liwe do zrabowania
int lootVolume;
std::vector<City*> edges;
bool border = false; // czy miasto znajduje siê na granicy
public:
City();
City(int i, int x, int y, int val, int vol, bool isBorder);
int getXPosition();
int getId();
int getYPosition();
std::string getName();
int getLootValue();
int getLootVolume();
bool isNeighbour(City* potentialNeighbour);
bool isOnBorder();
std::vector<City*>* getEgdes();
void addEdge(City* newNeighbour);
double getDistance(City* targetCity);
friend class DrawGraph; // dla u³atwienia procesu wyœwietlania
};