RosettaCodeData/Task/FizzBuzz/Inform-7/fizzbuzz-2.inf

17 lines
619 B
INI

The space is a room. An item is a kind of thing. In the space are 100 items.
To say the name:
let the count be the number of items carried by the player;
say "[if the count is the count to the nearest 15]fizzbuzz.[otherwise if the count is the count to the nearest 3]fizz.[otherwise if the count is the count to the nearest 5]buzz.[otherwise][the count in words].".
To count:
if an item is in the space
begin;
let the next one be a random item in the space; silently try taking the next one;
say "[the name]" in sentence case;
count;
end the story;
end if.
When play begins: count. Use no scoring.