Elevator: Elevator.m (1)
...
@implementation Elevator
-init: (int) nFloors type: (int) eType {
type = eType;
if (type)
floor = 0;
else {
if ([uniformIntRand getIntegerWithMin: 0 withMax: 1])
floor = 0;
else
floor = [uniformIntRand getIntegerWithMin: 1 withMax: nFloors];
}
return self;
}
...
Previous slide
Next slide
Back to first slide
View graphic version