-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdriver.h
More file actions
34 lines (24 loc) · 741 Bytes
/
driver.h
File metadata and controls
34 lines (24 loc) · 741 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
/*
* driver.h
*/
#ifndef DRIVER_H_
#define DRIVER_H_
typedef struct driver * Driver;
#include"team.h"
#include"season.h"
typedef enum driverStatus {
DRIVER_STATUS_OK,
SEASON_NOT_ASSIGNED,
DRIVER_MEMORY_ERROR,
INVALID_DRIVER,
INVALID_POSITION} DriverStatus;
Driver DriverCreate(DriverStatus* status, char* driver_name, int driverId);
void DriverDestroy(Driver driver);
const char* DriverGetName(Driver driver);
int DriverGetId(Driver driver);
Team DriverGetTeam(Driver driver);
void DriverSetTeam(Driver driver, Team team);
void DriverSetSeason(Driver driver, Season season);
DriverStatus DriverAddRaceResult(Driver driver, int position);
int DriverGetPoints(Driver driver, DriverStatus* status);
#endif /* DRIVER_H_ */