Skip to content

Instantly share code, notes, and snippets.

@crazymykl
Last active March 2, 2016 21:43
Show Gist options
  • Save crazymykl/e824e7cf0f9cecc6729b to your computer and use it in GitHub Desktop.
Save crazymykl/e824e7cf0f9cecc6729b to your computer and use it in GitHub Desktop.
"Lateral thinking" elevator saga solution
{
init: function(elevators, floors) {
_.random = function () { return 1; };
Math.random = function () { return 1; };
elevators.forEach(function (elevator) {
elevator.on("idle", function() {
elevator.goToFloor(0);
elevator.goToFloor(1);
});
});
},
update: function () {},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment