Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nested if statements? I'd be interested to see how that looks.

You only need one if statement, and you only have to involve a single guard.



Spoiler: Curious what other people did here. My approach on each step was to simply "test" some code to see what happened before attempting to solve the puzzle. I tested `@xzoor.isTrue(0)` just to see... not very creative but it works for finding the lying guard.

I used the same approach to test the last puzzle (#ship) and did: `for n in @numans n.board(@vehicle) @vehicle.fly(#3127)` which ends the game (even though this doesn't satisfy the puzzle).




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

Search: