-#include "hexmap.h"
-
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
+#include "hexagon.h"
+
/*
* TODO use binary heap for the openlist and closed list.
* open list should be a min-heap on the f value
struct HL_astar_hex *h;
if (!s) return 0;
- for(h = s->closed; h; h = h->next) {
+ for (h = s->closed; h; h = h->next) {
if (h->hex == hex) return h;
}
return NULL;
struct HL_astar_hex *h;
if (!s) return 0;
- for(h = s->open; h; h = h->next) {
+ for (h = s->open; h; h = h->next) {
if (h->hex == hex) return h;
}
return NULL;
yopen = in_open(s, y);
if (! yopen) {
yopen = add_open(s, y);
-
tent_better = 1;
} else if (cost < yopen->g) {
tent_better = 1;