| Yes, you were right. Now fixed. Mark Guzdial |
| Yes. Try it. Mark Guzdial |
| We're never going to go back and ask you to get P1 working again. If you can do without blocks, you don't have to implement it. Mark Guzdial |
| If something is dead, then it shows up in descriptions as dead, and it can't do anything. Destroy actually removes it from the room, as you say. You can have any number of actions for an object. You must implement the ones specified. Mark Guzdial |
| I think that the way we'll do it is that, for P2, just one person from the group turns it in. Once we know who is in which groups, we'll define group pages. Mark Guzdial |
| As the workspace code says. Doors aren't automagically made in both directions. There can be doors that, once you walk through them, there isn't a way back. Mark Guzdial |
| (sarcasm on)Of course! My goal is not to make sense and confuse you!(sarcasm off) We don't have an implementation to test the workspace code against, so I'm sure that there are errors. Please ask, and I'll be glad to fix it best I can. Mark Guzdial |
| You're right. Fixed. Thanks. Mark Guzdial |
| Like I said in class, this is single person, on purpose, to make it simpler. Make the design better in P6 – that's the point. Mark Guzdial |
| For right now, you only need to implement the language forms we're specifying. Mark Guzdial |
| You probably shouldn't be hard codeing anything. Think of what "take knife" really is. It's a verb followed by an object You can construct rules based on this so that you only have to have one or two rules for every object in the game. The AGObjects themselves should be responsible for dealing with these verbs Jared Parsons |
| Jared is partially right. You should be implementing as flexibly as possible. But yes, you must have defined the core vocabulary from the beginning, along with the conditions that make sense. For example, you shouldn't be able to 'use' anything that you don't have in your inventory. Mark Guzdial |
| I see it, Joaquin – fixed. Thanks! Mark Guzdial |
| Did you see me use it in class on Tuesday? Worked there. Mark Guzdial |
| We discussed this in class on Tuesday – perhaps you missed it. You are not going to subclass TelnetMachine nor modify it nor use an instance of it. You only really care about the method open which creates a user interface like the core of what you need to do. I started discussing the pluggable user interface components that TelnetMachine uses on Tuesday, and I'll finish them tomorrow. Mark Guzdial |
| There is no verbMatcher in the P2 code that I see. There is a method verbMatch:do: which is a message that an AGObject understands. It takes a string of a verb to match and a block (after the do:) that should be executed when the given verb is applied to the given object. verbHandler, given the example of knife verbMatch: 'throw' do: (knife verbHandler: 'use'). "Create an alias for 'use'", must return some object which could execute for the verb 'use', but now will also execute for the verb 'throw' Mark Guzdial |
| Read the method TelnetMachine open. You will never open a TelnetMachine in your code. Not ever. (I explained this in class Thursday.) Mark Guzdial |
| No, it's not okay. You may change whatever you want in P6. But in P2, P4, and P5, you must be able to run the workspace code we provide. Mark Guzdial |
| Your code must work with the workspace given. Your design must support the given interface. That's not an unusual request. Have you looked at Fall 2001 Milestone 6? Mark Guzdial |
| It's A Simple UI Example. You could find it by looking at the "Changes" (button at the top of the screen) and seeing what got posted Thursday. I linked it to the Fall 2001 Class Schedule. Mark Guzdial |
| Jared's right, but in general, checking the kindOf: is considered bad design. Instead, send a message to the object that you expect it to recognize, and define the same message for all the other kinds of things that it COULD be with a different response. Mark Guzdial |
| Suggestion: Read through Fall 2001 Project Milestones. You'll see that containment is a requirement at P4. Mark Guzdial |
| World in some cases needs to look through the various rooms(talking to all players in all rooms). Without adding all of the rooms in the beginign(to a Collection of sorts) it would require a graph search to get all of the rooms. I think it's done so that you can keep a collection of rooms and not have to exhausitvely search for them Jared Parsons |
| The text objects are pretty complex. My recommendation is to walk through the submorphs of PluggableTextMorph and see which one controls the foreground color. Mark Guzdial |
| I have walked through several components start up messages(Browser, Workspace and Transcript. I can't find a single place that they actually set the color of anything. I have been through their ugly and horrid code and I can't find it. I think that PluggableTextView controlls the foreground color but there doesn't seem to be any way to set that. Can someone give a little hint here? Jared Parsons |
| Nope, leave that...for now. (That's a bug that I realized I was putting in. Explain it semantically as the troll now chasing the player. But it's probably something to "fix" later.) Mark Guzdial |
| Yes. Mark Guzdial |
| You should check to make sure that the character is in the same room, its specified in the directions. His check is merely redundant. Squeaky Clean Squeakers |
| Yes, that's a bug. Fixing now. Mark Guzdial |
| Why? Do I specify any rules that have blocks on them? Mark Guzdial |
| Nevermind I figured this out named: is a class method not an instances method David Norvell |
| Sounds like you've already convinced yourself that the UI shouldn't close. Sounds like the right answer. Mark Guzdial |
| Thanks, Aaron – fixed. Mark Guzdial |
| BlockContext Webb |
| BlockContext is the object, like Webb says. To create one, Compiler evaluate: [Transcrip show: 'This here is a block!']. Mark Guzdial |
| Since nil doesn't understand >, I agree. Mark Guzdial |
| Send the changed: message, and it should refresh. (Haven't seen that happen yet myself, but I don't disbelieve you.) Mark Guzdial |
| It sounds to me like the problem is using StringHolder. Don't. Build your own model and make sure that it gets the input so that you can process it as you like. Mark Guzdial |
| Yes, you handle the default case, but if there's a verbhandler, process that. A good system that user-programmers extend should have reasonable defaults, but allow for overriding of those defaults. Mark Guzdial |
| It is easier to make the legislation "an object can only be contained in one room at a time". But it would be more interesting to allow it... Like having some particular character appear throughout the game in different places. Just break it down in your OOA/D and you will be confident I think Webb |
| You could also easily avoid this situation. Whenever a room is added to the world, scroll through all of hte characters in the room and make sure their name is not currently in the world. If it is then add something to their name to make them unique. You could also do the same check when a character or object is added to a room. Jared Parsons |
| We're not going to give you duplicate named objects, but you need to know if YOU care. In P5, P6, and P7, you're going to be building things with your own code. Do you think you might make that mistake? Do you think you might like to have a useful error message? You won't be graded for it, but it might make your life easier. Mark Guzdial |
| You noticed that, did you? :-) I wrote the definition of when:do: after writing the code. Yes, it's extraneous, but not damaging. Mark Guzdial |
| Why reset the flags? Just don't execute the when:do: until the player enters the room. Mark Guzdial |
| ABSOLUTELY NOT! You owe us OOA/D for everything you turn in in P2. Mark Guzdial |
| Oops! I see it, Jason. Fixed – thanks! Mark Guzdial |
| Objects DO know their room. Object's container is its room or the player's inventory. Mark Guzdial |
| Yes, you can ask the object for its location. You can also implement additional methods on AGWorld as you need them. You're not limited to what we specify. You just have to have at least that. Mark Guzdial |
| Certainly, the game is ended, so stop processing input. You could tell the user to close the window. I wouldn't reset anything, or worry about deleting anything. Mark Guzdial |
| I fixed all the print->print: and the don't, Graham – thanks! But I don't see where I'm sending value anywhere. Is there somewhere specific where I'm still missing :player :me :world? Mark Guzdial |
| It makes #north a symbol. As for what a symbol is, my guess says its a simple way of comparing equality (lighter weight than a String) and also frequently specifies a method selector. These might make good keys. Graham Coleman |
| Yes. Symbols are strings that are stored in one and only one place, i.e., all references to symbols point to the exact same object. Testing for equality means only testing the pointers – you don't have to walk the characters (like in a String). Mark Guzdial |
| Good call, Hieu! My bug. Leave it as it is – there are only two moves, then, but it sounds like your when:do: is working! Mark Guzdial |
| Why would you be storing rules in variables for movement? If you really need to share them among all the instances, create an instance method that returns the rules. Mark Guzdial |
| Read the notes here – it's been said a half dozen times now. Mark Guzdial |
| Yes. Mark Guzdial |
| That's the idea, but I didn't include an example. Yes, it is required since it's at the top of the assignment. Mark Guzdial |
| Put asterisks around your name Errol, to get the "url thingy". Yes, names can have two words. How else could you distinguish the Mad Troll from the Ugly Troll? You need to deal with that. No, I don't anticipate multiple word verbs. Yes, everything should have a default response to use and take. Mark Guzdial |
| Never heard of that one before. I wouldn't worry about it. Mark Guzdial |
| Remove them from the game, not from memory. The garbage collector does that. Mark Guzdial |
| Looks like it. Mark Guzdial |
| That's one reasonable way. Mark Guzdial |
| Character cr asString. Mark Guzdial |
| Thanks, Jesse. I'll try to get to these updates today.Mark Guzdial |
| Classes vs. instances, Andy. Classes don't save values of things. Mark Guzdial |
| Sounds like you're not answering the message for text display correctly. Check that. Mark Guzdial |
| Sounds like you're sending a message to an object that it's not appropriate for. Perhaps press the Debug button and figure out what the object and the message are? Mark Guzdial |
| "There can never be too many classes." Have you considered defining a Player class? Mark Guzdial |
| Absolutely – I didn't have an implementation to test my workspace code on, so there are certainly errors like that. Mark Guzdial |
| Thanks, Matt. I'll try to get to them. (As you can see, the messages are fast-and-furious, and I'm still grading midterms, so I might not get the chance to update the assignment. Hopefully, people will figure the syntax errors out.) Mark Guzdial |
| Yes, you are expected to find those objects and evaluate the block using those objects using value:with:with: Mark Guzdial |
| Hmm, I don't know. We don't plan to send you illegal blocks. Mark Guzdial |
| See previous – both questions are answered already.Mark Guzdial |
| 1 should be by-default – works that way in TelnetMachine, no? See class Cursor on hiding it. Mark Guzdial |
| Make one? Mark Guzdial |
| Oh, I assumed you were using two. Yes, I suggest using two like TelnetMachine. That's why I recommended TelnetMachine. Mark Guzdial |