projects
/
cs356-p1-elevator.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
54121a7468066f6c43589fdb6cde5ddaeaae467d
[cs356-p1-elevator.git]
/
test.cpp
1
#include <iostream>
2
#include <list>
3
#include <unistd.h>
4
using namespace std;
5
6
#include "stop.hpp"
7
#include "position.hpp"
8
#include "elevator.hpp"
9
10
11
int main (int argc, char *argv[])
12
{
13
Elevator e(2);
14
15
Stop s2(3, DOWN);
16
e.stop_at (s2);
17
18
Stop s3(1, UP);
19
e.stop_at (s3);
20
21
Stop s4(4, DOWN);
22
e.stop_at (s4);
23
24
Stop s5(5, ALL);
25
e.stop_at (s5);
26
27
for (int i=0; i<100; ++i)
28
{
29
usleep (500000);
30
e.move ();
31
}
32
33
return 0;
34
}
35
36
/* vim: set ts=4 sts=4 sw=4 noet tw=112: */