package edu.nyu.cs9053.concurrency.monitor;

import java.util.Random;

/**
 * User: blangel
 * Date: 11/9/14
 * Time: 3:59 PM
 */
public class ConsumerLogic {

    private final Random random;

    public ConsumerLogic(Random random) {
        this.random = random;
    }

    public boolean passengerWantsOff() {
        return (random.nextInt(100) < 25);
    }

    public Object consume(Elevator elevator) {
        return elevator.remove();
    }

}
