Hacker News new | past | comments | ask | show | jobs | submit login

Yeah this is basically correct. There is nothing really preventing an elevator from reporting that it's going both up and down. The up/down indicators are used for two things: 1. To shut off the up/down request indicators correctly on the floor when the elevator arrives. 2. By passengers to decide whether to get on an elevator or not.



Thanks, I'm having a hard time with those indicators as well. One question. If I never set the indicators in my code, do they automatically get set? Or are the passengers getting on the car when there is no indicator?. (So far I've been having a lot of people refuse to get on my car, and I assume it's because my code is setting the wrong indicator).

BTW, this is a game that will haunt me for a long time to come. Even when I pass a level, I stay on it trying to reduce the metrics rather than accept that I "lucked out" with my naive algorithm. You did a fantastic job on this.


I think they are automatically set to true at the start, and will never change unless you change them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: