-
Notifications
You must be signed in to change notification settings - Fork 0
/
Port.h
42 lines (32 loc) · 817 Bytes
/
Port.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
//
// Created by Admin on 6/18/2021.
//
#ifndef UNTITLED2_PORT_H
#define UNTITLED2_PORT_H
#include <string>
#include <queue>
#include <list>
#include "Sim_object.h"
#include "Geometry.h"
#include "Ship.h"
#define MAX_CONTAINERS_IN_PORT 500
class Port: public Sim_object {
protected:
Point _coordinates;
double _fuel { };
int _containers;
int _FPH;
std::queue<std::unique_ptr<Ship>> _fuelQueue;
public:
Port(std::string name, double x, double y, double Fuel = 10000,
int containers = 0, int FPH = 10);
virtual const Point& getPosition() const;
void setCoordinates(const Point &coordinates);
virtual void update();
void addShipToFuelQueue(Ship *a);
int getContainers() const;
void setContainers(int containers);
void status() override;
virtual ~Port() = default;
};
#endif //UNTITLED2_PORT_H