Skip to content

Instantly share code, notes, and snippets.

@savetheclocktower
Created October 26, 2010 22:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save savetheclocktower/648005 to your computer and use it in GitHub Desktop.
Save savetheclocktower/648005 to your computer and use it in GitHub Desktop.
Tools
Tools by Andrew Dupont begins here.
Book 1 - Stuff
Chapter 1 - Generic Objects
Section 1 - Unscrewing
A thing can be unscrewable. A thing is usually not unscrewable.
A thing can be screw-removing. A thing is usually not screw-removing.
Unscrewing is an action applying to one visible thing and one thing.
Understand "unscrew [thing] with [thing]" as unscrewing.
Understand "use [screw-removing thing] on/with [thing]" as unscrewing (with nouns reversed).
[UNSCREWING rules]
Unscrewing rules are an object-based rulebook.
An unscrewing rule for something (called candidate) (this is the can unscrew rule):
if the candidate is screw-removing:
rule succeeds;
otherwise:
rule fails.
[CAN-BE-UNSCREWED rules]
Can-be-unscrewed rules are an object-based rulebook.
A can-be-unscrewed rule for something (called candidate) (this is the can be unscrewed rule):
if the candidate is not unscrewable:
say "I don't think that's possible.";
rule fails;
if the candidate is not fixed in place:
say "It's already unscrewed.";
rule fails;
otherwise:
rule succeeds.
[CHECK/CARRY OUT rules]
Check unscrewing:
follow the unscrewing rules for the second noun;
if the rule failed:
rule fails;
follow the can-be-unscrewed rules for the noun;
if the rule failed:
rule fails;
otherwise:
continue the action.
Carry out unscrewing:
now the noun is not fixed in place.
Tools ends here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment