- uint8_t open_north = pos_i >= world.map.size.x;
- uint8_t open_east = pos_i + 1 % world.map.size.x;
- uint8_t open_south = pos_i + world.map.size.x < map_size;
- uint8_t open_west = pos_i % world.map.size.x;
- if (open_north)
+ uint8_t open_north = pos_i >= world.map.size.x;
+ uint8_t open_east = pos_i + 1 % world.map.size.x;
+ uint8_t open_south = pos_i + world.map.size.x < map_size;
+ uint8_t open_west = pos_i % world.map.size.x;
+ uint8_t is_indented = (pos_i / world.map.size.x) % 2;
+ uint8_t open_diag_west = is_indented || open_west;
+ uint8_t open_diag_east = !is_indented || open_east;
+ if (open_north && open_diag_east)