4 ms·
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 wa
by Zimahl 13y ago
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.
- nddrylliog 13y agoIf 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.
- Zimahl 13y agoThanks 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.
- tempestn 13y agoThe 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.
- nddrylliog 13y agoThat's exactly the point of the game :) Thanks for explaining it.
- effbott 13y agoNested 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.
- potench 13y agoSpoiler: 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).