/* The beer song, written in OADL, (Object Action Definition Language), * the designated heir to ADL (Adventure Definition Language). * * Ross Cunniff, 1997 */ /* Declare the beerWall class and its publics. We could insert the * actual beerWall class implementation here if we preferred, but * I like top-down programming better. */ class beerWall; public describe, takeOneDown, numBeers, beerProc; /* Here is our wall o' beer (oops - #17 is bear whiz instead) */ beerWall wall { numBeers = 99 beerProc = proc( n ) { if( n == 17 ) return "bear whiz"; else return "beer"; } } /* The actual main program. Take 'em all down. */ proc main() { /* We have 99 bottles. We want to take them all down. */ do { wall.describe(); } while( wall.takeOneDown() ); } /*** Implementation of the beerWall class ***/ class beerWall { public var numBeers;