4 ms·
for the door question, you should support: open @door, @xzoor.askKey(@door)
by ggoodwin37 13y ago
for the door question, you should support:
open @door, @xzoor.askKey(@door)
- nddrylliog 13y agoThanks for the feedback. See https://news.ycombinator.com/item?id=5795893 https://news.ycombinator.com/item?id=5795893 for context - window.open gets called on 'open'. If any HNers have ideas for restricting what gets called, I'm all ears. Source is on GitHub, at https://github.com/nddrylliog/thechoice https://github.com/nddrylliog/thechoice
- ggoodwin37 13y agoSorry, I wasn't clear (and I think I meant "unlock", not "open"). I meant that you should support skipping temporary variables.
- nddrylliog 13y agoOh. See that's another game design decision. Nothing prevents you from typing: unlock @door, <action to get the key> But when doing user testing, lots of non-coders got stuck at this point. It's clearer to them when things happen one after the other. So, if I can find a good way to teach them that when you do a(b(c))) first, b is called first, then a with the return value of b - without making a lenghty tutorial-type explanation, I'll do it. In the meantime, this'll do :)
- abecedarius 13y agoCan't you do something like eval("function() { var open = unlock; " + expression + " }")(); ? (I haven't looked at your code.)