Part Lighting
Definition: a thing is inaccessible rather than accessible if it is nowhere or it is enclosed by a closed container.
A thing can be lightbound, darkbound, or unbound. A thing is usually unbound.
To decide whether there should be light:
if the breaker panel is switched on, yes;
if the location of the lantern is the location and the lantern is switched on and the lantern is accessible, yes; [Using this instead of scope because scope is only recalculated at specific times]
no.
To decide whether there should not be light:
if there should be light, no;
yes.
To decide whether there should be darkness:
if there should be light, no;
yes.
To rearrange the set:
if there should be light:
now all lightbound things are scopable;
now all lightbound things are not undescribed;
now all darkbound things are unscopable;
now all darkbound things are undescribed;
otherwise:
now all darkbound things are scopable;
now all darkbound things are not undescribed;
now all lightbound things are unscopable;
now all lightbound things are undescribed.
Before doing anything with an unscopable thing:
now the latest parser error is the can't see any such thing error;
carry out the printing a parser error activity;
stop the action.
Rule for printing a parser error when the latest parser error is the can't see any such thing error and there should be darkness: say "You feel around, but can't find any such thing in the dark."
Every turn: rearrange the set.
After going: rearrange the set; continue the action.
Before looking: rearrange the set.
When play begins: rearrange the set.
[The moon is a darkbound thing in Alpha.
The sun is a lightbound thing in Alpha.]
[The first-door is jammed.]