kyranstar / Hunt-The-Wumpus

6 stars 0 forks source link

Fully implement hints/secrets #48

Closed WasabiFan closed 9 years ago

WasabiFan commented 9 years ago

In the spec, they mention "hints" and "secrets". It is explained that secrets are contextual pieces of info that relate specifically to the map that the user is playing on. "Hints" are never explained, although it appears that they are the pieces of trivia that you give the user.

So, I think that we should use the current "hint flyout" to be a general space to show both hints (pieces of tivia) and secrets (map info). For this, I need a word to use to describe this information that could be put in a button -- any ideas?

WasabiFan commented 9 years ago

@kyranstar I just pushed a new SecretManager class that is supposed to create new secrets and compose their text. Can you implement that UnlockNewSecret method? From the spec, it says:

The secrets range from not very useful to very useful. You can be told the room number where a bat lives, where a pit is, if the Wumpus is within 2 rooms of you, or the room number where the Wumpus is currently. However, you might also be told what room number you are currently in or the answer to a trivia question you have gotten wrong.

That method should randomly pick the type of secret to give and generate text for it. You can chose what kinds of info it might include. I'm currently working on getting the GUI part of this hooked up so that we can hopefully be fully spec-compliant by tomorrow.

kyranstar commented 9 years ago

How can I test it? Does it get called? Also, when I try to buy hints, when I finish the questions, it displays "-1, -1" and doesn't give me a hint.

WasabiFan commented 9 years ago

Also, when I try to buy hints, when I finish the questions, it displays "-1, -1" and doesn't give me a hint.

You aren't supposed to be able to buy hints -- we misread/misunderstood the spec. You can buy secrets; hints are the "pieces of trivia" that you get every time you enter a new room. This is why I am rushing for this in the last few days -- I only realized yesterday that we had a whole extra set of things to add. And we still don't have the actual hint text :worried:

How can I test it? Does it get called?

My hope is that I will have the UI that calls it done within the next 15 minutes (it's almost ready). In the meantime, you can add a call somewhere in the GameController that just gets a hint or two and prints it to the log. Sorry I can't be of much more help than that...

kyranstar commented 9 years ago

Cool! Should hints happen whenever you enter a new room or whenever you enter any room? Because right now it's any room. Also, text doesn't scroll/move on to the next line.

WasabiFan commented 9 years ago

Should hints happen whenever you enter a new room or whenever you enter any room?

It's supposed to be a new room. I just left a comment on your commit about that (before I noticed your post here), but yeah.. that's another little detail that we just never got to fully implement.

Also, text doesn't scroll/move on to the next line.

I'm trying to figure that out... I think there's something simple that I need to do to make it scroll, I just don't remember what it is :(