Language Inform 7
(Natural Inform)
Date: | 08/07/08 |
Author: | David Short |
URL: | https://launchpad.net/~chameleondave |
Comments: | 5 |
Info: | http://www.inform-fiction.org |
Score: | ![]() |
"Ninety-nine bottles of beer" by David Short The wall is a room. A bottle is a kind of thing. In the wall are 99 bottles. To say how many: say "[if no bottle is in the wall]no[otherwise][the number of bottles in the wall in words]". To say how many in sentence case: say "[how many]" in sentence case. To sing the song: if a bottle is in the wall begin; say "[How many in sentence case] bottle[s] of beer on the wall, [how many] bottle[s] of beer. "; let the next one be a random bottle in the wall; silently try taking the next one; say "Take one down and pass it round, [how many] bottles of beer on the wall.[paragraph break]"; sing the song; otherwise; say "No more bottles of beer on the wall, no more bottles of beer."; say "Go to the store and buy some more, ninety-nine bottles of beer on the wall!"; end the game saying "end of the song"; end if. When play begins: sing the song. Use no scoring.
Download Source | Write Comment
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
in accordance with the official lyrics, instead of saying 'bottle(s)' in the
first place?
(incorrectly according to you) that Inform wasn't smart enough to automatically
remove the 's' from '1 bottles'. My education is now complete.
the 'Take one down' line, I ended up with 'one bottle' just fine, but I also ended
up with 'no bottle' in the second-to-last verse. I don't know how to fix it, but I
thought that you should be aware of the minor glitch.