The Fox and the Crow

Aesop

The Fox and the Crow
// The Fox and the Crow — cinematic code fable

const Forest = Place.of("Forest");
const Branch = Forest.tree("oak").branch("high");

const Cheese = Food.of("Cheese");

const Crow = Bird.of("Crow")
   .landOn(Branch)
   .hold(Cheese, { in:"beak" });

const Fox = Animal.of("Fox");

Fox.enter(Forest)
   .see(Crow)
   .see(Cheese)
   .want(Cheese);

Fox.stopUnder(Branch)
   .tiltHead()
   .smile();

// Social engineering begins
Fox.say("Good day, noble Crow!")
   .pause(1)
   .say("What a magnificent bird you are.")
   .say("Your feathers shine like night velvet.")
   .pause(1)
   .say("If your voice matches your beauty—")
   .say("you must be the queen of all birds.");

Crow.blink()
   .standTaller()
   .feel("pride");

Crow.think("I should prove it.");

if ( Crow.openBeakTo("sing") ) {
  Cheese.fall();
}

Fox.catch(Cheese)
   .bite(Cheese)
   .laughSoftly()
   .say("Thank you for the gift.");

Fox.lookUp()
   .say("Remember this:")
   .say("Flattery is free,")
   .say("but it is never for free.");

Fox.leave(Forest);

Crow.silent()
    .lowerHead()
    .learn("do not trade judgment for praise");