Early Childhood
This would be a one-star example if it were not for the repainting:
Test me with "look / get red block".
You can see six red blocks, four blue blocks and a green block here.
>(Testing.)
>[1] look
Nursery
You can see six red blocks, four blue blocks and a green block here.
>[2] get red block
Taken.
But a kind cannot change during play, so this will not do. Instead, the colour will have to be a property of the block. So we might first try this:
Test me with "look / get red block".
You can see eleven blocks here.
>(Testing.)
>[1] look
Nursery
You can see eleven blocks here.
>[2] get red block
You can't see any such thing.
Which is fine, so far as it goes, but the colour property is not at all visible to the player, who simply sees "eleven blocks". We thought of colour as being something outwardly apparent, but Inform does not know this. To achieve a better effect, we will need features from distant chapters. The first is an activity called "printing the name of":
Test me with "look / get red block".
You can see eleven red blocks here.
>(Testing.)
>[1] look
Nursery
You can see eleven red blocks here.
>[2] get red block
You can't see any such thing.
This too, however, is unsatisfactory. The individual blocks are correctly described, but we are unable to distinguish them during play: we cannot type "take a green block", for instance. And because the blocks are indistinguishable in play, they are still massed together as "eleven blocks" in room descriptions. We need to go one step further:
And now everything works nicely: the blocks are grouped by colour, and can be referred to by colour, and we can even change the colour of an individual block during play, using a bit of extra trickery from later:
Test me with "get red block / get blue block / g / i / look / paint blue block red / i / look / paint me red".
You can see six red blocks, four blue blocks and a green block here.
>(Testing.)
>[1] get red block
Taken.
>[2] get blue block
Taken.
>[3] g
Taken.
>[4] i
You are carrying:
two blue blocks
a red block
>[5] look
Nursery
You can see five red blocks, two blue blocks and a green block here.
>[6] paint blue block red
The block is now red.
>[7] i
You are carrying:
two red blocks
a blue block
>[8] look
Nursery
You can see five red blocks, two blue blocks and a green block here.
>[9] paint me red
Paints are only for blocks.