So I have 3 enums named land_type, entity, tile as shown:
enum land_type {
GRASS,
WATER,
PATH_START,
PATH_END,
PATH_UP,
PATH_RIGHT,
PATH_DOWN,
PATH_LEFT,
TELEPORTER
};
enum entity {
EMPTY,
ENEMY,
BASIC_TOWER,
POWER_TOWER,
FORTIFIED_TOWER,
};
and I have created a struct named:
struct tile {
enum land_type land;
enum entity entity;
int n_enemies;
}; // which consists of all the enums.
I have also created something called map[SP1][SP2], SP1 = Row component of starting point
and SP2 is column component of starting point. both of type ints. Similarly, map[EP1][EP2] is
the end points. How do I assign these Starting points and end points into the enum
PATH_START and PATH_END respectively?

So I have 3 enums named land_type, entity, tile as shown enum lan.pdf

  • 1.
    So I have3 enums named land_type, entity, tile as shown: enum land_type { GRASS, WATER, PATH_START, PATH_END, PATH_UP, PATH_RIGHT, PATH_DOWN, PATH_LEFT, TELEPORTER }; enum entity { EMPTY, ENEMY, BASIC_TOWER, POWER_TOWER, FORTIFIED_TOWER, }; and I have created a struct named: struct tile { enum land_type land; enum entity entity; int n_enemies; }; // which consists of all the enums. I have also created something called map[SP1][SP2], SP1 = Row component of starting point and SP2 is column component of starting point. both of type ints. Similarly, map[EP1][EP2] is the end points. How do I assign these Starting points and end points into the enum PATH_START and PATH_END respectively?