13

Elevator Saga - the elevator programming game

 4 years ago
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.
neoserver,ios ssh client

Elevator Saga The elevator programming game

Wiki & Solutions Documentation Help
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

Made by Magnus Wolffelt and contributors

Version 1.6.5

Source code on GitHub

Run tests


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK