Skip to content

Instantly share code, notes, and snippets.

@kumo
Created May 16, 2014 09:55
Show Gist options
  • Select an option

  • Save kumo/15963e8d3f418f614d5a to your computer and use it in GitHub Desktop.

Select an option

Save kumo/15963e8d3f418f614d5a to your computer and use it in GitHub Desktop.
"Hells Kitchen" by Robert Clarke.
Use scoring;
Kitchen is a room. A Pie is in the Kitchen. Bread is in the Kitchen.
A Chef is a man in the Kitchen.
The oven is a closed openable container in the Kitchen
Heat is a kind of value. The heats are raw, slightly cooked, cooked, overcooked, burnt.
A dish is a kind of thing. A dish is always edible. A dish has a heat. A dish is usually raw. The Pie is a dish. The Bread is a dish.
Instead of giving or showing an overcooked Pie to the Chef:
move the Pie to the Chef;
say "You cooked it for too long.".
Instead of giving or showing a burnt Pie to the Chef:
move the Pie to the Chef;
say "You cooked it for too long.".
Instead of giving or showing a cooked Pie to the Chef:
move the Pie to the Chef;
increase the score by 2;
say "It looks good."
Every turn:
repeat with item running through dishes in the oven:
let the current heat be the heat of the item;
if the current heat is overcooked:
say "you smell burning...";
decrease the score by 1;
if the current heat is burnt:
say "you definately smell something burning...";
decrease the score by 2;
Every turn:
repeat with item running through dishes in the oven:
let the current heat be the heat of the item;
if the current heat is not burnt, now the heat of the item is the heat after the current heat.
Before printing the name of a dish (called the plate):
say "[heat of the plate] ".
Understand the heat property as describing a dish.
@kumo

kumo commented May 16, 2014

Copy link
Copy Markdown
Author

This cooking story is inspired by the "Disenchantment Bay" example that is provided with the new version of Inform 7.

Note: do not change the order of the two "Every turn:" blocks otherwise things won't work as expected...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment