Subversion Repositories programming

Rev

Rev 321 | Rev 329 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
321 ira 1
 
2
#ifndef CONTROLLER_H
3
#define CONTROLLER_H
4
 
5
#include <assert.h>
6
#include <vector>
328 ira 7
#include <limits.h>
8
#include <math.h>
321 ira 9
#include "elevator.h"
10
 
11
class Controller
12
{
13
    public:
14
        Controller (int num_floors, int num_elevators);
15
        ~Controller ();
16
 
17
        void request_elevator (int on_floor);
18
 
19
    private:
328 ira 20
        bool floor_already_requested (int on_floor);
21
        int find_closest_elevator (int to_floor);
22
 
23
        std::vector<Elevator> elevators;
321 ira 24
        int num_floors;
25
        int num_elevators;
26
};
27
 
28
#endif // CONTROLLER_H
29