I’m following the example on page 212 of the Inform 6 manual. However, it looks like Puny lacks the ability to infer collections of objects.
Class GoldCoin
with name 'gold' 'coin',
short_name "gold coin",
plural "gold coins";
Object -> CashRegister "cash register"
with
description "[ This is the cash register. TODO: There will be some money in here ]",
name 'cash' 'register',
has container openable static;
GoldCoin -> ->;
GoldCoin -> ->;
GoldCoin -> ->;
Here, the coins are listed individually:
> open cash register
You open the cash register, revealing a gold coin, a gold coin and a gold coin.
What’s the best way of ensuring they’re listed as ‘some gold coins’ when plural, and ‘a gold coin’ when there is only one? I imagine I need to iterate over the contents of the cash register and count the coins. How do I do that? Can I do that?