Elevator Saga – An elevator programming game
101–108 of 108 posts
Re: Elevator Saga – An elevator programming game
#102Slightly related - SimTower was originally created as an elevator simulator - if you right click on an elevator engine room in the game you get a wealth of programming options
Re: Elevator Saga – An elevator programming game
#103Earlier quoted context omitted.
They have that at work and it takes far longer to get an elevator. It's always annoying going to those buildings and using those elevators.
I like it much more. Yes, getting an elevator might take longer, but total travel time should be reduced. (Otherwise, the system is programmed wrong.)
Re: Elevator Saga – An elevator programming game
#104Slightly related - SimTower was originally created as an elevator simulator - if you right click on an elevator engine room in the game you get a wealth of programming options
The people in that game were a lot smarter though; if the only path to a floor required switching elevators, they would do it.
Re: Elevator Saga – An elevator programming game
#105Developer here! Thanks for all the feedback. Appreciate all of it, including bug reports! Pull requests also welcome. Especially I would appreciate help with adding more challenges, and/or making them all balanced and interesting, for a good and reasonable difficulty curve. It is very simple to tweak them - they are defined at the bottom of challenges.js: https://github.com/magwo/elevatorsaga/blob/master/challenges..…
hi, why leaving the elevator at a floor doesn't pick up additional passengers? i.e. http://pastebin.com/xA4NJbas @ http://play.elevatorsaga.com/#challenge=2 (yes that's only a stub, but has logging as I was trying to understand the event order) at least elevator.goToFloor(elevator.currentFloor()); doesn't count as a move and unlocks the passenger to onboarding btw, when you start you get 2 moves per elevator in the m…
The additional-people-not-getting-on is kind of an architectural problem with the game, working on it.
Re: Elevator Saga – An elevator programming game
#106Earlier quoted context omitted.
I believe some people really need think in term of comparations and, for those, adding a "==" symbol make sense, even if the resultant code doesn't make any sense at all!! Also, I can never understand why people write .. if (foo()) { return true; } else { return false; } .. or things like extra parens on conditionals, or weird styles like: return (false); I strongly believe people write as they talk, and talk as they…
Many languages are expressions (as opposed to statements) including C-like languages. I've always thought that 'return' itself was redundant. If a compound statement was defined to return the value of the final (executed) statement, then functional methods would get much simpler. And remove the need for the '?' operator for instance. e.g. int foo(int x) { bar(x,y); } or x = {if (foo() > 9) true; else false; }
Re: Elevator Saga – An elevator programming game
#107Earlier quoted context omitted.
Many languages are expressions (as opposed to statements) including C-like languages. I've always thought that 'return' itself was redundant. If a compound statement was defined to return the value of the final (executed) statement, then functional methods would get much simpler. And remove the need for the '?' operator for instance. e.g. int foo(int x) { bar(x,y); } or x = {if (foo() > 9) true; else false; }
I think one problem with statements-as-expression is that is not always evident which should be their result. for instance: bool r = if (test()) { false; } else { true; } what r should be set to? true or false ? I don't see the point of adding such complexity.. it's waaay more clear to be explicit bool r = test(); if (r) { false; } else { true; } or, if you intended the other way bool r; if (test()) { r = false; } el…
bool r = !test();Re: Elevator Saga – An elevator programming game
#108Earlier quoted context omitted.
Guess, I got lucky, haha. I should probably go back to challenge 2 and learn how to program these then.
On six it takes you back to 4 floors with 2 elevators and the challenge is 40 people in under 60 elevator moves. The first 5 are easy to "brute force" but six is making me think a bit more.