Elevator Saga - the elevator programming game
Elevator Saga The elevator programming game Wiki & Solutions Documentation Help Challenge #1: Transport 15 people in 60 seconds or less Start 2x 0 1 2 0 012 Transported 0 Elapsed time 0s Transported/s 0.00 Avg waiting time 0.0s Max waiting time 0.0s Moves 0 1 { 2 init: function(elevators, floors) { 3 var elevator = elevators[0]; // Let's use the first elevator 4 5 // Whenever the elevator is idle (has no more queued destinations) ... 6 elevator.on("idle", function() { 7 // let's go to all the floors (or did we forget one?) 8 elevator.goToFloor(0); 9 elevator.goToFloor(1); 10 }); 11 }, 12 update: function(dt, elevators, floors) { 13 // We normally don't need to do anything here 14 } 15 } Reset Undo reset Apply Save Confused? Open the Help and API documentation page Made by Magnus Wolffelt and contributors Version 1.6.5 Source code on GitHub Run tests
Challenge #1: Transport 15 people in 60 seconds or less 2x 0 1 2 0 012 Transported0 Elapsed time0s Transported/s0.00 Avg waiting time0.0s Max waiting time0.0s Moves0 x 15 1 { 2 init: function(elevators, floors) { 3 var elevator = elevators[0]; // Let's use the first elevator 4 5 // Whenever the elevator is idle (has no more queued destinations) ... 6 elevator.on("idle", function() { 7 // let's go to all the floors (or did we forget one?) 8 elevator.goToFloor(0); 9 elevator.goToFloor(1); 10 }); 11 }, 12 update: function(dt, elevators, floors) { 13 //…
saved by
related reading
- Elevatorsjohn.fun
- Nick Winter's Blog | The 120-Hour Workweek - Epic Coding Time-Lapseblog.nickwinter.net
- Elevator algorithmen.wikipedia.org
- Colfcolf.dev
- Squeezing a sokoban game into 10 lines of codecole-k.com
- A half-hour to learn Rustfasterthanli.me
- The Joel Test: 12 Steps to Better Code – Joel on Softwarejoelonsoftware.com
- Learn X in Y Minutes: Scenic Programming Language Tourslearnxinyminutes.com
- Numbers Every Programmer Should Know By Yearcolin-scott.github.io
- Ampampcode.com
- A Bunch of Programming Advice I'd Give To Myself 15 Years Ago | Marcus' Blogmbuffett.com
- [12 hours] Ethereum code line-by-lineyoutube.com