Class Tilemap

Class Documentation

class Tilemap

Public Functions

inline Tilemap()
~Tilemap() = default
std::pair<int, int> GetSize() const

Get the Size object.

Returns:

std::pair<x, y>

std::vector<std::vector<Tile>> GetTilemap()

Get the Tilemap.

Returns:

std::vector<std::vector<Tile>>

void SetSize(int x, int y)

Set the Size of the tilemap.

Parameters:
  • x – Contain the width of the tilemap

  • y – Contain the height of the tilemap

void SetTileInventory(int x, int y, size_t food, size_t linemate, size_t deraumere, size_t sibur, size_t mendiane, size_t phiras, size_t thystame)

Set the inventory of one tile.

Parameters:
  • x – Contain position x of the tile

  • y – Contain position y of the tile

  • food – Contain number of food of the tile

  • linemate – Contain number of linemate of the tile

  • deraumere – Contain number of deraumere of the tile

  • sibur – Contain number of sibur of the tile

  • mendiane – Contain number of mendiane of the tile

  • phiras – Contain number of phiras of the tile

  • thystame – Contain number of thystame of the tile

void AddToInventory(int x, int y, Item item, int quantity)

Add a quantity of item to an element.

Parameters:
  • x – Contain position x of the tile

  • y – Contain position y of the tile

  • item – Contain the id of the item

  • quantity – Contain the quantity of the item to add

Inventory GetTileInventory(int x, int y)
int GetItemQuantity(Item id)

Get the Item Quantity of item in the tilemap.

Parameters:

id – Contain the id of the item to get the quantity

Returns:

int