projects
/
cs356-p1-elevator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make Elevator idleness depend on number of stops
[cs356-p1-elevator.git]
/
elevator.cpp
diff --git
a/elevator.cpp
b/elevator.cpp
index
62dfb19
..
f2be628
100644
(file)
--- a/
elevator.cpp
+++ b/
elevator.cpp
@@
-517,6
+517,9
@@
void Elevator::move ()
bool Elevator::is_idle () const
{
+ if (stops_.size() != 0)
+ return false;
+
return direction_ == IDLE;
}