Tom's Midnight Garden
Example 299
★Time can also be understood as a token, and the time parsed will be recorded as "the time understood". So therefore, if we wish for clocks which may be set:
"Tom's Midnight Garden"
A clock is a kind of device. A clock has a time called the current time. A clock can be analog or digital. The current time of a clock is usually 9:01 AM. The description of a clock is "It shows the time to be [if analog]about [the current time to the nearest five minutes in words][otherwise][the current time][end if]."
Understand "set [clock] to [time]" as setting it by time. Setting it by time is an action applying to one thing and one time.
Instead of setting a clock to something:
say "[The noun] can be set only to a time of day, such as 8:00 AM, or midnight."
Carry out setting a clock by time:
now the current time of the noun is the time understood.
Report setting a clock by time:
say "You set [the noun] to [time understood]."
Every turn:
repeat with item running through switched on clocks:
now the current time of the item is one minute after the current time of the item.
The Hall is a room. The grandfather clock is a fixed in place analog clock in the Hall. The travel clock is a switched on digital clock in the Hall. When play begins: now the right hand status line is "[time of day]".
Test me with "examine grandfather clock / set it to midnight / switch it on / wait / wait / wait / examine it / set travel clock to 4:12 / examine it".
Test me with "examine grandfather clock / set it to midnight / switch it on / wait / wait / wait / examine it / set travel clock to 4:12 / examine it".
Hall
You can see a grandfather clock and a travel clock here.
>(Testing.)
>[1] examine grandfather clock
It shows the time to be about nine o'clock.
The grandfather clock is currently switched off.
>[2] set it to midnight
You set the grandfather clock to 12:00 am.
>[3] switch it on
You switch the grandfather clock on.
>[4] wait
Time passes.
>[5] wait
Time passes.
>[6] wait
Time passes.
>[7] examine it
It shows the time to be about five past twelve.
The grandfather clock is currently switched on.
>[8] set travel clock to 4:12
You set the travel clock to 4:12 am.
>[9] examine it
It shows the time to be 4:13 am.
The travel clock is currently switched on.
You can see a grandfather clock and a travel clock here.
>(Testing.)
>[1] examine grandfather clock
It shows the time to be about nine o'clock.
The grandfather clock is currently switched off.
>[2] set it to midnight
You set the grandfather clock to 12:00 am.
>[3] switch it on
You switch the grandfather clock on.
>[4] wait
Time passes.
>[5] wait
Time passes.
>[6] wait
Time passes.
>[7] examine it
It shows the time to be about five past twelve.
The grandfather clock is currently switched on.
>[8] set travel clock to 4:12
You set the travel clock to 4:12 am.
>[9] examine it
It shows the time to be 4:13 am.
The travel clock is currently switched on.