Language ALAN
| Date: | 04/20/05 |
| Author: | Stephen Griffiths |
| URL: | n/a |
| Comments: | 0 |
| Info: | n/a |
| Score: |
-- "99 Bottles of Beer" ALAN (v2.x) version
-- Stephen Griffiths, 1999
-- ALAN is a text adventure authoring system
-- webpage at http://www.welcome.to/alan-if
LOCATION Wall NAME '99' Bottles 'of' Beer
HAS Bottles 99.
END LOCATION.
EVENT Sing
"$p"
SAY Bottles OF Wall.
"bottle"
IF Bottles OF Wall > 1 THEN
"$$s"
END IF.
"of beer on the wall,"
"$n"
SAY Bottles OF Wall.
"bottle"
IF Bottles OF Wall > 1 THEN
"$$s"
END IF.
"of beer."
"$nTake"
IF Bottles OF Wall > 1 THEN
"one"
ELSE
"it"
END IF.
"down, pass it around,"
DECREASE Bottles OF Wall.
IF Bottles OF Wall > 0 THEN
"$n"
SAY Bottles OF Wall.
"bottle"
IF Bottles OF Wall > 1 THEN
"$$s"
END IF.
"of beer on the wall."
SCHEDULE Sing AFTER 0.
ELSE
"$nNo bottles of beer on the wall,"
"$nNo bottles of beer."
QUIT.
END IF.
END EVENT.
START AT Wall.
SCHEDULE Sing AFTER 0.
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