Skip to content

Always LOOK when you re-enter the room #38

Answered by okaybenji
drrak asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, thank you for your question and very glad you like the engine!

There are a number of ways to tackle this. @dthigpen's recommendation above is one way. The upside to this approach is that it doesn't change anything about how the engine works, which is a less brittle approach (because if the engine changed, your adaption might break). The downside is that it isn't very DRY (as in "don't repeat yourself"). I should note here I'm referring to the idea of updating each room manually to do this. The suggestion of applying this change programmatically would certainly DRY it up.

Another approach which would be more DRY but also more brittle would be to override the enterRoom command. You woul…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by okaybenji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #36 on June 12, 2024 14:58.