-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathBuildingState.h
More file actions
executable file
·51 lines (42 loc) · 1.32 KB
/
BuildingState.h
File metadata and controls
executable file
·51 lines (42 loc) · 1.32 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
/*
* Copyright 2023 University of Michigan EECS183
*
* BuildingState.h
* Project UID 28eb18c2c1ce490aada441e65559efdd
*
* Final Project - Elevators
*/
#ifndef _BUILDING_STATE_H_
#define _BUILDING_STATE_H_
#include "Utility.h"
////////////////////////////////////////////////////////
///////// DO NOT MODIFY ANY CODE IN THIS FILE //////////
////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// BuildingState //
// ---------------- //
// These structs will contain public state information //
// to be passed to the AI for further use //
//////////////////////////////////////////////////////////////////////
struct _Person {
int angerLevel = 0;
};
struct _Floor {
int floorNum = 0;
int numPeople = 0;
bool hasUpRequest = false;
bool hasDownRequest = false;
_Person people[MAX_PEOPLE_PER_FLOOR];
};
struct _Elevator {
int elevatorId = 0;
int targetFloor = 0;
int currentFloor = 0;
bool isServicing = false;
};
struct BuildingState {
int turn = 0;
_Floor floors[NUM_FLOORS];
_Elevator elevators[NUM_ELEVATORS];
};
#endif