PixelWars/team.h
2015-01-19 08:20:38 +01:00

64 lines
756 B
C

#ifndef TEAM_H
#define TEAM_H
#define WRITE 0
#define READ 4
// 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, // humans
SPAWN, WALL, ROAD, MARK, LIBRARY // buildings
};
// Action types
enum{
MOVE,
ATTACK,
PICK,
PUT,
WORK,
WAIT,
COMMUNICATE
};
typedef struct{
int type;
int dir;
void* data;
} t_action;
int getInventory();
int getNear(int dir);
int getInfo(int dir);
#endif