Skip to content

Comment on Show HN: The Choice – An online programming puzzle RPGparent

Comments

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).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.