shithub: asif

Download patch

ref: 3e38012538f96fa06dcd8a3808a0f2936e83b5a4
parent: 154c63ab6892df6fc66663d8c7c9f71b4bbc4d9f
author: qwx <[email protected]>
date: Thu Mar 17 03:06:08 EDT 2022

remove useless grid, add path node-sorfof type

--- a/path/dat.h
+++ b/path/dat.h
@@ -1,12 +1,23 @@
 typedef struct Vertex Vertex;
 typedef struct Node Node;
+typedef struct PNode PNode;
 
 struct Vertex{
 	int x;
 	int y;
 };
+struct PNode{
+	int open;
+	int closed;
+	double g;
+	double h;
+	Node *to;
+	Node *from;
+	Pairheap *pq;
+};
 struct Node{
 	int blocked;
+	PNode;		// generalize later
 };
 extern Node *map;
 extern int mapwidth, mapheight;
--- a/path/grid.c
+++ /dev/null
@@ -1,15 +1,0 @@
-#include <u.h>
-#include <libc.h>
-#include "../asif.h"
-#include "dat.h"
-#include "fns.h"
-
-struct PNode{
-	Vertex;
-};
-
-void
-initgrid(void)
-{
-
-}