|
|
This needs some investigation. |
Lemonade Stand. Selling lemonade, making money, unpredictable weather. Yep, reminds you of being a kid again.
The game was developed by MECC on a mainframe (probably an HP 2000-series) in 1973, and later ported to Applesoft BASIC on the Apple II. The original version of the game was likely developed using HP Time-Shared BASIC (HP TSB). It's unclear if the original mainframe-era source code survives.
First Two Days' Weather#
The weather is determined randomly for each day. A bit of commented-out code at line 460:
460 REM IF D<3 THEN SC=2
...would have forced the weather to "sunny" for the first two days, presumably to ease the players into the gameplay. However, this was disabled at some point. Instead, other events (price increases, thunderstorms, street crews) will not occur for the first two days.
REM'ed Credits#
Among the first lines of the BASIC listing is this text:
10 REM <<< LEMONADE STAND >>>
15 REM
20 REM FROM AN ORIGINAL PROGRAM
30 REM BY BOB JAMISON, OF THE
40 REM MINNESOTA EDUCATIONAL
50 REM COMPUTING CONSORTIUM
60 REM * * *
70 REM MODIFIED FOR THE APPLE
80 REM FEBRUARY, 1979
90 REM BY CHARLIE KELLNER
Bugs#
Total Number of Players#
The entire game state is contained in the array:
135 DIM A(30),L(30),H(30),B(30),S(30),P(30),G(30)
At a glance, this makes sense as 30 students was a typical maximum class size of the era. Unfortunately, the code contains an off-by-one error as elsewhere the 0th index is never used. Had it been, a maximum of 31 players would have been permitted. Even today this is a very common class of bug as humans don't intuitively count from zero.
Something to do with Thunderstorms#
The array H(1) is initialized but never used. It seems it was supposed to have some effect on thunderstorm frequency. The HP Time-Shared BASIC source code, if extant, might have slightly more complex weather generation or this might be a bug in the original. Without more information it's hard to say.
Unreachable Code#
Line 2200 contains unreachable code that seems to be intended to prevent street crew workers from making repeated visits from day to day.
External Links#
- Codenautics commentary on the Apple II BASIC source listing: see the
.PDFin the source code archive.