Subversion Repositories programming

Rev

Rev 347 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 347 Rev 351
Line 220... Line 220...
220
 
220
 
221
    // Open the elevator door
221
    // Open the elevator door
222
    gui->open_elevator_at (num_floors-(floor+1), elevator_num);
222
    gui->open_elevator_at (num_floors-(floor+1), elevator_num);
223
 
223
 
224
    // FIXME -- always unsets up button
224
    // FIXME -- always unsets up button
225
    if (floor >= 0 && floor <= 8)
225
    if (floor >= 0 && floor <= num_floors-2)
226
        gui->unset_up_button (floor);
226
        gui->unset_up_button (floor);
227
 
227
 
228
    // FIXME -- always unsets down button
228
    // FIXME -- always unsets down button
229
    if (floor >= 1 && floor <= 9)
229
    if (floor >= 1 && floor <= num_floors-1)
230
        gui->unset_down_button (floor-1);
230
        gui->unset_down_button (floor-1);
231
 
231
 
232
    // Get the floors from the user
232
    // Get the floors from the user
233
    gui->get_floors_from_user (elevator_num);
233
    gui->get_floors_from_user (elevator_num, floor);
234
 
234
 
235
    // Close the elevator door
235
    // Close the elevator door
236
    gui->close_elevator_at (num_floors-(floor+1), elevator_num);
236
    gui->close_elevator_at (num_floors-(floor+1), elevator_num);
237
 
237
 
238
    unpause_all_elevators ();
238
    unpause_all_elevators ();