/***************************************************************************** 
 *graphmaster.h                                                              *
 *                                                                           *
 *Tom Stepleton and Stephanie Wojtkowski                                     *
 *                                                                           *
 *Header file for graphmaster.c, a module containing obstacle manipulation   *
 *tools.                                                                     *
 ****************************************************************************/

#define MAX_CONNECTED_VERTICES 50

typedef struct {
  double x;
  double y;
} point;

typedef struct Child_rec {
  void *Kid;
  struct Child_rec *next;
  double cost;
} Child;

typedef struct {
  point Location;
  Child *Children;
  double h;
} nodeInfo;

Obstacle MakeWellBehavedBox(Obstacle box);
int HorizontalIntersect(point p1, point p2, point b1, point b2);
int VerticalIntersect(point p1, point p2, point b1, point b2);
int LineIntersectsBox(point l1, point l2, Obstacle box);
void Expando(Obstacle *box, double units);
double GetEuclDist(point p1, point p2);
nodeInfo makeVertex(point myLocation);
void addChild(nodeInfo *v, nodeInfo *neighbor);
Node *makeRootNode(nodeInfo *rootNodeInfo);
double gcalc(Node *theNode);
double hcalc(Node *theNode);
int nodeEqual(Node *theOneNode, Node *theOtherNode);
int goalNode(Node *theNode);
void freeNode(Node *p);
Node *children(Node *BigDaddy);
void printNode(Node *p);
void graphNode(Node *p, char c);

