PDA

View Full Version : Chapter 6 Gatekeeper excercise


Slepley
11-06-2009, 03:16 PM
Hi i am having trouble with the gate keeper excercise on page 203. i was wondering if i need to have 4 parameters for each person for example pharoh as parameter a mummy as b and so on. and if there is a way i can have locations on alice to identify what location a certain person is in. thanks

scott

x2495iiii
11-07-2009, 03:44 AM
Do you want a good example, with the proper, complex code that doesn't involve multiple if/else ifs, or do you want the simple if/else if example, easy to understand but much more cumbersome?

yozamacs
12-14-2009, 07:30 PM
I downloaded that example and it made no sense to me what the connection was with the gamekeeper and did not help me at all.

x2495iiii
12-14-2009, 10:13 PM
My examples are usually the same programming you need to know to make the world, but with COMPLETELY different objects so that it's impossible to submit them as your assignments.

Examine the underlying code and you'll notice that in both examples, the gatekeeper logic is there. Once you understand how that code works, make your gatekeeper world and apply that new knowledge to it.