
13

Elevator Saga - the elevator programming game
source link: https://play.elevatorsaga.com/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Transported0
Elapsed time0s
Transported/s0.00
Avg waiting time0.0s
Max waiting time0.0s
Moves0
{
init: function(elevators, floors) {
var elevator = elevators[0]; // Let's use the first elevator
// Whenever the elevator is idle (has no more queued destinations) ...
elevator.on("idle", function() {
// let's go to all the floors (or did we forget one?)
elevator.goToFloor(0);
elevator.goToFloor(1);
});
},
update: function(dt, elevators, floors) {
// We normally don't need to do anything here
}
}
Confused? Open the Help and API documentation page
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK