News for hackers. Stuff that matters.
Re:Show HN: The Choice – An online programming puzzle RPG by Zimahl on Thursday May 30, 2013 @08:37PM (#5796142)
I'll be honest, I don't understand the logic I need to get through the truth-teller/liar test since it isn't quite clear what I'm allowed to do. If you just want me to do a ton of embedded if/else statements, meh, I've lost interest.

If the goal it to teach programming, increase an interest in programing, or expose a language that others might not be exposed to, the worst way to do it it to make your target audience feel stupid. The initial questions to show the answer command aren't very easy - frankly they are seriously flawed riddles. Second, showing variables isn't described well enough to intrinsically know what to do unless you've already been exposed to programming.

I guess it all depends on the target audience, but it's not all that clear who that is.

Re:Show HN: The Choice – An online programming puzzle RPG by nddrylliog on Thursday May 30, 2013 @08:54PM (#5796215)
If you have a ton of embedded if/else statements you're doing it wrong. Only one if/else is required.

Thanks for giving me a course about game design and asking questions obviously not answered in Chapter 1. Where can I send you money? <3.

Re:Show HN: The Choice – An online programming puzzle RPG by Zimahl on Friday May 31, 2013 @02:06AM (#5797148)
Thanks for giving me a course about game design and asking questions obviously not answered in Chapter 1. Where can I send you money? <3.

Did you not post this expecting constructive feedback? Snark aside, chapter 1 of what? You haven't made it clear what this really is. Is this python? Do you want to use a game to teach the language or is this just a game and the language is irrelevant?

On the question I was having trouble with I was over thinking the isTrue method. It just wasn't all that clear to me until I did some pseudo debugging with it.

Re:Show HN: The Choice – An online programming puzzle RPG by tempestn on Friday May 31, 2013 @02:20AM (#5797192)
The language is irrelevant. It's coffeescript, but the whole thing is 'beatable' with an understanding of logic by following its instructions.

If you've never programmed before at all, some parts would indeed be tricky, including the part you mentioned. Still, if you understand how to solve the logic puzzle, you could do it using a temporary variable as previously demonstrated, rather than the more natural (to programmers) nested calls.

Re:Show HN: The Choice – An online programming puzzle RPG by nddrylliog on Friday May 31, 2013 @08:34AM (#5798171)
That's exactly the point of the game :) Thanks for explaining it.
Re:Show HN: The Choice – An online programming puzzle RPG by effbott on Thursday May 30, 2013 @09:09PM (#5796282)
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.

Re:Show HN: The Choice – An online programming puzzle RPG by potench on Saturday June 01, 2013 @08:21PM (#5806700)
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).