Subversion Repositories programming

Rev

Rev 331 | Rev 334 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 331 Rev 332
Line 4... Line 4...
4
 
4
 
5
#include <assert.h>
5
#include <assert.h>
6
#include <vector>
6
#include <vector>
7
#include <limits.h>
7
#include <limits.h>
8
#include <math.h>
8
#include <math.h>
-
 
9
#include <cstdio>
9
#include "elevator.h"
10
#include "elevator.h"
10
 
11
 
11
class Elevator;
12
class Elevator;
12
 
13
 
13
class Controller
14
class Controller
Line 25... Line 26...
25
        void disable_elevator (int elevator_number);
26
        void disable_elevator (int elevator_number);
26
        void enable_elevator (int elevator_number);
27
        void enable_elevator (int elevator_number);
27
 
28
 
28
    private:
29
    private:
29
        bool floor_already_requested (int on_floor);
30
        bool floor_already_requested (int on_floor);
30
        int find_closest_elevator (int to_floor);
31
        int find_closest_elevator (int to_floor, int in_direction);
31
 
32
 
32
        std::vector<Elevator> elevators;
33
        std::vector<Elevator> elevators;
33
        int num_floors;
34
        int num_floors;
34
        int num_elevators;
35
        int num_elevators;
35
};
36
};