Page 1 of 1

Lemonade Stand

PostPosted: July 16th, 2016, 4:04 am
by gmh
Hi all,

I have ported Lemonade Stand from Applesoft BASIC to Microsoft BASIC (I have only tested on CP/M 2.2). I have left the code/line numbering as close to the original as possible. Obviously the Altair Clone does not support graphics so these have been removed, in the future I may add them as ASCII art, but I have no timeline for completing this. As it stands the game is fully functional, although you must have caps lock enabled to play the game.

Please note the original game made heavy use of Applesoft BASIC's CLS (clear screen) command. I have replicated this with the following line (and a bunch of PRINT CL$ commands through the source). If you are not using a DEC VT100 compatible terminal/terminal emulator be sure to change this line to suit your terminal type.

Code: Select all
4 CL$=CHR$(27)+"[2J": REM CLEAR SCREEN

You can find the BASIC source code attached (LEMONADE.BAS.zip) at the bottom of this post.

Here are some screenshots of the game in action.

Image
Image
Image

Re: Lemonade Stand

PostPosted: September 11th, 2016, 11:30 pm
by gmh
I have found a bug in the source;

Code: Select all
2230 IF RND ( - 1) < .5 THEN 2233

--- should read ---

Code: Select all
2230 IF RND (1) <.5 THEN 2233

If you have downloaded this game previous to today (Sep 12, 2016), please make the change above.

I have uploaded the patched version, and this is now the version available for download.

Re: Lemonade Stand

PostPosted: September 13th, 2016, 2:04 am
by toml_12953
gmh wrote:Hi all,

I have ported Lemonade Stand from Applesoft BASIC to Microsoft BASIC (I have only tested on CP/M 2.2). I have left the code/line numbering as close to the original as possible. Obviously the Altair Clone does not support graphics so these have been removed, in the future I may add them as ASCII art, but I have no timeline for completing this. As it stands the game is fully functional, although you must have caps lock enabled to play the game.

If you're using MITS Extended BASIC or MBASIC, you can use the UCASE$ function on your input before you test it so that caps lock can be on or off with no difference to the test.

Code: Select all
10 INPUT A$: A$=UCASE$(A$)
20 IF A$="YES" THEN 140


This will branch to 140 if you enter yes, Yes, YEs, YeS, YES, yEs, yES. or yeS.

Tom L