]> pd.if.org Git - hexagon/blobdiff - astar.c
style fix
[hexagon] / astar.c
diff --git a/astar.c b/astar.c
index cabe5d08c4c36dec8d0bf86490fe5e2424e4a2a2..6e897589bf3561f5edceb37d6e243211c3490448 100644 (file)
--- a/astar.c
+++ b/astar.c
@@ -1,11 +1,11 @@
-#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
@@ -136,7 +136,7 @@ struct HL_astar_hex *in_closed(struct HL_astar *s, int hex) {
        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;
@@ -146,7 +146,7 @@ struct HL_astar_hex *in_open(struct HL_astar *s, int hex) {
        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;
@@ -229,7 +229,6 @@ int HL_findpath(struct HL_astar *s, int loops) {
                        yopen = in_open(s, y);
                        if (! yopen) {
                                yopen = add_open(s, y);
-
                                tent_better = 1;
                        } else if (cost < yopen->g) {
                                tent_better = 1;