struct wp_coord {
uint8_t i:4;
uint8_t j:3;
- uint8_t end:1;
+ uint8_t reserved:1;
};
struct wp_line {
const struct wp_coord **selected_circuit,
int8_t *selected_face);
+/* try to unblock in any situation */
+uint8_t strat_unblock(void);
+
/* harvest on the best circuit */
uint8_t strat_harvest_circuit(void);
-void test_strat_avoid(void);
+/* get the neighbour of the point at specified dir, return -1 if
+ * there is no neighbor */
+int8_t wp_get_neigh(uint8_t i, uint8_t j, uint8_t *ni, uint8_t *nj,
+ uint8_t dir);
+
+/* count the number of non-black corns which are neighbors of
+ * specified cob */
+uint8_t corn_count_neigh(uint8_t i, uint8_t j);
+
+/* return true if a waypoint belongs to a line */
+uint8_t wp_belongs_to_line(uint8_t i, uint8_t j, uint8_t linenum, uint8_t dir);
+
+uint8_t is_60deg(uint8_t dir1, uint8_t dir2);
+uint8_t is_120deg(uint8_t dir1, uint8_t dir2);
+
+void strat_avoid_init(void);
#endif