#ifndef TEAM_H
#define TEAM_H

#define WRITE 0
#define READ 4

// Teams
enum{
	PURPLE, ORANGE, NB_TEAMS
};

// coordinates structure
typedef struct{
	int x;
	int y;
} t_coord;

// Directions
enum{
	NORTH, EAST, SOUTH, WEST
};

// communication
#define LIBRARY_SIZE 128
#define DUDE_MEMORY 128
enum{
	BOOK_1,
	BOOK_2,
	BOOK_3,
	BOOK_4
};

typedef struct{
	int flag;
	char data[32];
} t_com;

// Tile types
enum{
	BEDROCK, GRASS, TREE, BERRIES, ROCK, IRON_ORE, // nature
	FOOD, WOOD, STONE, IRON, SWORD, // resources
	DUDE, DEAD_DUDE, // humans
	SPAWN, WALL, ROAD, MARK, LIBRARY // buildings
};

// Action types
enum{
	MOVE,
	ATTACK,
	PICK,
	PUT,
	WORK,
	WAIT,
	COMMUNICATE
};

typedef struct{
	int type;
	int dir;
	t_com com_data;
} t_action;

int getInventory();

int getNear(int dir);

int getInfo(int dir);

t_com* getComData();

void* getMemory();

int getSuccess();

#endif