-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcar.h
More file actions
34 lines (23 loc) · 787 Bytes
/
Copy pathcar.h
File metadata and controls
34 lines (23 loc) · 787 Bytes
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
// edited, turn this file in
#ifndef _car_h
#define _car_h
#include <stdlib.h>
#include <stdbool.h>
typedef struct Car
{
// MADE BY ME helper variable to help me visualize which car's 'turn' it is
int carID;
// the time step associated with the addCar event that added this car
int stepAdded;
// the intersection this car started from
int origin;
// the intersection this car is driving toward currently
int next;
// the intersection this car wants to ultimately stop at
int destination;
// track whether a car has moved during this time step (remember to reset to false before next time step)
bool moved;
} Car;
Car* createCar( int carID, int stepAdded, int origin, int next, int destination );
void freeCar( Car* c );
#endif