projects
/
cs356-p1-elevator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add Elevator Number to Elevators
[cs356-p1-elevator.git]
/
elevator.cpp
diff --git
a/elevator.cpp
b/elevator.cpp
index
d4e7cfb
..
4a5eb37
100644
(file)
--- a/
elevator.cpp
+++ b/
elevator.cpp
@@
-1,21
+1,23
@@
#include "elevator.hpp"
#include "elevator.hpp"
-Elevator::Elevator ()
+Elevator::Elevator (
int elevator_number
)
: state_(STATE_IDLE)
, wait_(0)
, direction_(IDLE)
, position_()
, stops_()
: state_(STATE_IDLE)
, wait_(0)
, direction_(IDLE)
, position_()
, stops_()
+ , number_(elevator_number)
{
// Intentionally Left Empty
}
{
// Intentionally Left Empty
}
-Elevator::Elevator (int starting_floor)
+Elevator::Elevator (int starting_floor
, int elevator_number
)
: state_(STATE_IDLE)
, wait_(0)
, direction_(IDLE)
, position_(starting_floor)
, stops_()
: state_(STATE_IDLE)
, wait_(0)
, direction_(IDLE)
, position_(starting_floor)
, stops_()
+ , number_(elevator_number)
{
// Intentionally Left Empty
}
{
// Intentionally Left Empty
}