Lemonade Stand

General discussions related to the Altair 8800 Clone

Lemonade Stand

Postby gmh » July 16th, 2016, 4:04 am

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
Attachments
LEMONADE.BAS.zip
Line 2230 error fixed in this version.
(4.35 KiB) Downloaded 221 times
Last edited by gmh on September 11th, 2016, 11:34 pm, edited 1 time in total.
gmh
 
Posts: 38
Joined: August 12th, 2014, 5:19 am
Location: Melbourne, AU

Re: Lemonade Stand

Postby gmh » September 11th, 2016, 11:30 pm

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.
gmh
 
Posts: 38
Joined: August 12th, 2014, 5:19 am
Location: Melbourne, AU

Re: Lemonade Stand

Postby toml_12953 » September 13th, 2016, 2:04 am

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
toml_12953
 
Posts: 205
Joined: June 7th, 2013, 12:54 pm


Return to General Discussions

Who is online

Users browsing this forum: Google [Bot] and 4 guests

cron