(no title)
Ideka | 11 years ago
First, why do you have to call checkDestinationQueue after modifying the queue? It's awfully redundant. I assume this is due to some kind of limitation.
And second, goingUpIndicator and goingDownIndicator are kind of sketchy. Can you activate both at the same time? What effect would that have? There should be a single property, directionIndicator of an enum type with the possible values up, down, and none. I don't think you can make enums in javascript though, but I don't know the language very well. I'm just explaining this in terms that I know; there probably is a suitable javascript equivalent or replacement.
Bdiem|11 years ago
DestinationQueue handling: It is not redundant, those are different options. Just to give an valid example: Add something to the queue, sort the queue, make the elevator run the updated and sorted queue.
Having both goingUpIndicator and goingDownIndicator is probabaly necessary to get this abritrary third state (both enabled / both disabled) which essentially indicates that the elevator will go in both directions.
avereveard|11 years ago
magwo|11 years ago