Class Trantor¶
Defined in File Trantor.hpp
Class Documentation¶
-
class Trantor¶
Public Functions
-
Trantor() = default¶
-
Trantor(int id, int x, int y, int orientation, int level)¶
Construct a new Trantor object.
- Parameters:
id – Contain the id of the trantor
x – Contain the x position of the trantor
y – Contain the y position of the trantor
orientation – Contain the orientation of the trantor
level – Contain the level of the trantor
-
~Trantor() = default¶
-
int GetId() const¶
Get the Id of the trantor.
- Returns:
int
-
int GetRotation() const¶
Get the Rotation of the trantor.
- Returns:
int [0-7]
-
int GetLevel() const¶
Get the Level.
- Returns:
int
-
std::map<std::string, size_t> GetInventory()¶
Get the Inventory.
- Returns:
std::map<std::string, size_t>
-
void SetPosition(int x, int y, int orientation)¶
Set the Position object.
- Parameters:
x – Contain the x position of the trantor
y – Contain the y position of the trantor
orientation – Contain the orientation of the trantor
-
void SetPosition(int x, int y)¶
Set the Position object.
- Parameters:
x – Contain the x position of the trantor
y – Contain the y position of the trantor
-
void AddPosition(int x, int y)¶
Add x and y to the x and y position.
- Parameters:
x – Contain the x that will be add to x position
y – Contain the y that will be add to y position
-
std::pair<int, int> GetPosition()¶
Get the Position of the trantor.
- Returns:
std::pair<int, int>
-
void SetLevel(int level)¶
Set the Level of the trantor.
- Parameters:
level –
-
void SetInventory(size_t q0, size_t q1, size_t q2, size_t q3, size_t q4, size_t q5, size_t q6)¶
Set the Inventory of the trantor.
- Parameters:
q0 – Contain the food quantity to set the inventory
q1 – Contain the linemate quantity to set the inventory
q2 – Contain the deraumere quantity to set the inventory
q3 – Contain the sibur quantity to set the inventory
q4 – Contain the mendiane quantity to set the inventory
q5 – Contain the phiras quantity to set the inventory
q6 – Contain the thystame quantity to set the inventory
-
void AddToInventory(Item item, int quantity)¶
Add items to the the Inventory of the trantor.
- Parameters:
q0 – Contain the food quantity to add to the inventory
q1 – Contain the linemate quantity to add to the inventory
q2 – Contain the deraumere quantity to add to the inventory
q3 – Contain the sibur quantity to add to the inventory
q4 – Contain the mendiane quantity to add to the inventory
q5 – Contain the phiras quantity to add to the inventory
q6 – Contain the thystame quantity to add to the inventory
-
void SetBroadcast(std::string &message)¶
Set the Broadcast object.
- Parameters:
message – Contain the message the trantor is screaming
-
void IsTrantorLaying(bool state)¶
Set the laying state of the trantor.
- Parameters:
state – Contain the state is the trantor is laying or not
-
Trantor() = default¶