LittleSimulatorInJava LittleSimulatorInJavaHistory
Ok, but what happened to the event list and the events? ( see LittleSimulator )
For that we need a second test, and a second person.
Person1 starts on Floor1 Person2 starts on Floor2 Person1 to request elevator in 9 seconds Person2 to request elevator in 6 seconds Remove nearest event which is request elevator for Person2 in 6 seconds.
Then the event list and the events:
SortedSet eventList = new SortedSet(); // SortedSet( events ) class Event { Time m_time; Action m_action; }