Little Riding Hood

/*

Little Riding Hood, pesudocode version

Inspired by eri
By Emil Oppeln-Bronikowski

*/

mother = new Person(Person::Female);

rrh = new Person(Person::Female);

basket = new Items(Items::Basket);

scenery = new templates();

// First scene

scenery->load(”home”);

scenery->attach(mother);

scenery->attach(rrh);

// We need object in basket

mother->copyObjects(mother->stock, basket);

foreach(basket as food){

// learn rrh object what’s in basket object by enumeration

rrh->addInformation(food);

}

mother->attachObject(rrh,basket);

grandma = new Person(Person::Female);

mother->addEvent(rrh, grandma->position());

scenery->load(”woods”);

wolf = new Animal(Animal::Wolf);

scenery->attach(rrh);

scenery->attach(wolf);

while(rrh->eventLoop()){

rrh->postition(

scenery->currentX, [...]

February 26th, 2008 · Tags Pisanina, µGeek | 6 Comments »