-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproblem.h
More file actions
58 lines (44 loc) · 1.13 KB
/
problem.h
File metadata and controls
58 lines (44 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
Written by William Sutherland for
COMP20007 Assignment 1 2023 Semester 1
Modified by Grady Fitzpatrick
Header for module which contains problem
specification data structures and functions.
*/
#ifndef PROBLEM_H
#define PROBLEM_H
#include <stdio.h>
#include "map.h"
/* The struct for problemA */
struct problemA {
struct point *testPoints;
int numPoints;
struct map *m;
};
struct problemD {
struct map *m;
struct point *start;
struct point *end;
};
struct problemE {
struct map *m;
struct point *start;
struct point *end;
struct point *airports;
int numAirports;
};
/* Reads Problem A from data */
struct problemA *readProblemA(FILE *f);
/* Reads Problem B from data */
struct map *readProblemB(FILE *f);
/* Reads Problem D from data */
struct problemD *readProblemD(FILE *f);
/* Reads Problem E from data */
struct problemE *readProblemE(FILE *f);
/* Reads a map from data */
struct map *readMap(FILE *f);
/* Frees the memory from the problems */
void freeProblemA(struct problemA *p);
void freeProblemD(struct problemD *p);
void freeProblemE(struct problemE *p);
#endif