The Happy Prince
Oscar Wilde

const city = world.place("City"); // City square setting
const EGYPT = world.place("Egypt"); // Swallow's intended destination
const GOLD_LEAF = Material.GOLD.leaf; // Gold leaf coating token
const SAPPHIRE = Gem.SAPPHIRE; //gem token
const RUBY = Gem.RUBY; //gem token
// Scene: The Happy Prince above the city
const Prince = Statue.of("Happy Prince")
.standOver(city) // High position
.body.coveredWith(GOLD_LEAF);
Prince.withJewels({
eyes: [SAPPHIRE, SAPPHIRE], // Two sapphires for the eyes
sword: { hilt: RUBY }, // Ruby set in the sword hilt
});
// Swallow arrives & rests before leaving for Egypt
const Swallow = new Bird("Swallow") ;
function giveAid(to, jewel, via) {
Swallow
.agree() // One more night
.pluckFrom(Prince, jewel) // Take jewel
.flyTo(to, { via }) // Fly
.deliver(jewel) // Deliver
.feelWarmth() // Emotional warmth
.returnTo(Prince);
}
// Night: Prince sees the city's suffering
Swallow.prepareFor(EGYPT) // Preflight
.restUnder(Prince) // Night shelter
.listen(Prince);
Prince.weep()
.say("From this high place I see every pain down there.");
// (1) Give ruby to the seamstress
Prince.lookAt(Swallow)
.say("Stay one more night. Take the ruby to the seamstress.");
const SEAMSTRESS = Citizen.of("seamstress"); // Poor mother
giveAid(SEAMSTRESS, RUBY,"window");
// (2) Give sapphire to the playwright
Prince.lookAt(Swallow)
.say("One more night. Give a sapphire to the playwright.");
const PLAYWRIGHT = Citizen.of("playwright"); // Starving artist
giveAid(PLAYWRIGHT, SAPPHIRE,"garret");
Swallow.shiver()
.say("It is cold... but I love you, Happy Prince.");
// (3) Give second sapphire to the match-girl
Prince.lookAt(Swallow)
.say("Just one more night. Help the match-girl.");
const MATCH_GIRL = Citizen.of("match-girl"); // Little girl
giveAid(MATCH_GIRL, SAPPHIRE,"street");
Prince.blind();
Swallow.silent()
.say("You are blind now. I will stay with you always.");
while ( Prince.has(GOLD_LEAF) ) {
Swallow
.peel( GOLD_LEAF,{count: 1})
.sprinkleOver(Poor.streets());
}
City.Officials.order("melt statue");
Foundry.melt(Prince.body());
DustHeap.receive( Prince.heart("lead"));
DustHeap.receive( Swallow.body());
Heaven.send("Angel")
.collect([ Prince.heart("lead"), Swallow.body()])
.say("These are the two most precious things in the city.")
.carryTo("Paradise");
}