zynamo

Map.h

Jan 21st, 2018
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.87 KB | None | 0 0
  1. ////////////////////////////////////////////////////////////////////////
  2. // COMP2521 18x1 ... the Fury of Dracula
  3. // Map.h: an interface to a Map data type
  4. //
  5. // 2017-11-30   v1.0    Team Dracula <cs2521@cse.unsw.edu.au>
  6.  
  7. #ifndef MAP_H_
  8. #define MAP_H_
  9. #include <stdbool.h>
  10. #include "Places.h"
  11.  
  12. typedef struct edge {
  13.     LocationID start;
  14.     LocationID end;
  15.     TransportID type;
  16. } edge;
  17.  
  18. // graph representation is hidden
  19. typedef struct map *Map;
  20.  
  21. // operations on graphs
  22. Map newMap (void);
  23. void disposeMap (Map);
  24. void showMap (Map);
  25. int numV (Map);
  26. int numE (Map, TransportID);
  27. int connections(Map g, LocationID start, LocationID end, TransportID []);
  28. int numberOfConnections(Map g, LocationID start, bool road, bool rail, bool sea);
  29. int *locationsConnected (Map g, LocationID start, int arraySize, bool road, bool rail, bool sea);
  30.  
  31.  
  32. #endif // !defined(MAP_H_)
Add Comment
Please, Sign In to add comment