From 6ce05b54fad96625c0a69e1408a4d66cb8053f0f Mon Sep 17 00:00:00 2001 From: Renaud Fivet Date: Tue, 7 May 2024 14:35:05 +0800 Subject: [PATCH] Add CALNDR, CHIEF, HURKLE, MATHDI, MUGWMP and STARS. --- dec/CALNDR.BAS | 55 +++++++++++++++++++++++++++++++++++++++ dec/CHIEF.BAS | 49 +++++++++++++++++++++++++++++++++++ dec/HURKLE.BAS | 48 ++++++++++++++++++++++++++++++++++ dec/MATHDI.BAS | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ dec/MUGWMP.BAS | 56 ++++++++++++++++++++++++++++++++++++++++ dec/STARS.BAS | 56 ++++++++++++++++++++++++++++++++++++++++ port/CALNDR.BAS | 56 ++++++++++++++++++++++++++++++++++++++++ port/CHIEF.BAS | 49 +++++++++++++++++++++++++++++++++++ port/HURKLE.BAS | 48 ++++++++++++++++++++++++++++++++++ port/MATHDI.BAS | 68 +++++++++++++++++++++++++++++++++++++++++++++++++ port/MUGWMP.BAS | 56 ++++++++++++++++++++++++++++++++++++++++ port/STARS.BAS | 56 ++++++++++++++++++++++++++++++++++++++++ 12 files changed, 665 insertions(+) create mode 100644 dec/CALNDR.BAS create mode 100644 dec/CHIEF.BAS create mode 100644 dec/HURKLE.BAS create mode 100644 dec/MATHDI.BAS create mode 100644 dec/MUGWMP.BAS create mode 100644 dec/STARS.BAS create mode 100644 port/CALNDR.BAS create mode 100644 port/CHIEF.BAS create mode 100644 port/HURKLE.BAS create mode 100644 port/MATHDI.BAS create mode 100644 port/MUGWMP.BAS create mode 100644 port/STARS.BAS diff --git a/dec/CALNDR.BAS b/dec/CALNDR.BAS new file mode 100644 index 0000000..7109ea3 --- /dev/null +++ b/dec/CALNDR.BAS @@ -0,0 +1,55 @@ +100 REM VALUES FOR 1973; SEE NOTES +110 ' +120 FOR I=1 TO 6\ PRINT CHR$(10);\ NEXT I +130 D=-1 '1973 STARTS ON MON. [0=SUN.,-1=MON.,-2=TUE...] +140 S=0 +150 REM: READ DAYS OF EACH MONTH +160 FOR N=0 TO 12 \ READ M(N) \ NEXT N +170 '''''''' +180 FOR N=1 TO 12 +190 PRINT \ PRINT \ S=S+M(N-1) +200 PRINT "**";S;TAB(7); +210 FOR I=1 TO 18 \ PRINT "*"; \ NEXT I +220 ON N GOTO 230,240,250,260,270,280,290,300,310,320,330,340 +230 PRINT " JANUARY "; \GOTO 350 +240 PRINT " FEBRUARY"; \GOTO 350 +250 PRINT " MARCH "; \GOTO 350 +260 PRINT " APRIL "; \GOTO 350 +270 PRINT " MAY "; \GOTO 350 +280 PRINT " JUNE "; \GOTO 350 +290 PRINT " JULY "; \GOTO 350 +300 PRINT " AUGUST "; \GOTO 350 +310 PRINT "SEPTEMBER"; \GOTO 350 +320 PRINT " OCTOBER "; \GOTO 350 +330 PRINT " NOVEMBER"; \GOTO 350 +340 PRINT " DECEMBER"; +350 FOR I=1 TO 18 \ PRINT "*"; \ NEXT I +360 PRINT 365-S;"**"; +370 ' [366-S; ON LEAP YEARS] +380 PRINT CHR$(10) \ PRINT " S M T W"; +390 PRINT " T F S +400 PRINT +410 FOR I=1 TO 59 \ PRINT "*"; \ NEXT I +420 '''' +430 FOR W=1 TO 6 +440 PRINT CHR$(10) +450 PRINT TAB(4); +460 '' +470 FOR G=1 TO 7 +480 D=D+1 +490 D2=D-S +500 IF D2>M(N) THEN 580 +510 IF D2>0 THEN PRINT D2; +520 PRINT TAB(4+8*G); +530 NEXT G +540 '' +550 IF D2=M(N) THEN 590 +560 NEXT W +570 '''' +580 D=D-G +590 NEXT N +600 '''''''' +610 FOR I=1 TO 6\ PRINT CHR$(10);\ NEXT I +620 DATA 0,31,28,31,30,31,30,31,31,30,31,30,31 +630 ' [0,31,29, ..., ON LEAP YEARS] +640 END diff --git a/dec/CHIEF.BAS b/dec/CHIEF.BAS new file mode 100644 index 0000000..f326456 --- /dev/null +++ b/dec/CHIEF.BAS @@ -0,0 +1,49 @@ +10 PRINT " I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD." +20 PRINT "ARE YOU READY TO TAKE THE TEST YOU CALLED ME OUT FOR"; +30 INPUT A$ +40 IF A$="YES" THEN 60 +50 PRINT "SHUT UP, PALEFACE WITH WISE TOUNGE." +60 PRINT " TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND" +70 PRINT "MULTIPLY BY 8. DIVIDE BY 5 AND ADD THE SAME. SUBTRACT 1." +80 PRINT "WHAT DO YOU HAVE"; +85 PRINT +90 INPUT B +100 LET C = (B+1-5)*5/8*5-3 +110 PRINT "I BET YOUR NUMBER WAS " C" WAS I RIGHT"; +120 INPUT D$ +130 IF D$="YES" THEN 510 +140 PRINT "WHAT WAS YOUR ORIGINAL NUMBER"; +150 INPUT K +155 LET F=K+3 +160 LET G=F/5 +170 LET H=G*8 +180 LET I=H/5+5 +190 LET J=I-1 +200 PRINT "SO YOU THINK YOU'RE SO SMART, EH?" +210 PRINT "NOW WATCH...." +230 PRINT K"PLUS 3 EQUALS "F". THIS DIVIDED BY 5 EQUALS"G"," +240 PRINT "THIS TIMES 8 EQUALS"H". IF WE DIVIDE BY 5 AND ADD THE SAME," +250 PRINT "WE GET"I". MINUS 1 EQUALS"J"." +260 PRINT "NOW DO YOU BELIEVE ME"; +270 INPUT Z$ +290 IF Z$="YES" THEN 510 +295 PRINT "YOU HAVE MADE ME MAD!!!" +300 PRINT "THERE MUST NOW BE A GREAT LIGHTNING BOLT!" +310 PRINT\PRINT +330 FOR X=30 TO 22 STEP -1 +340 PRINT TAB(X) "X X" +350 NEXT X +360 PRINT TAB(21)"X XXX" +370 PRINT TAB(20) "X X" +380 PRINT TAB(19) "XX X" +390 FOR Y=20 TO 13 STEP -1 +400 PRINT TAB(Y) "X X" +410 NEXT Y +420 PRINT TAB(12) "XX" +430 PRINT TAB(11) "X" +440 PRINT TAB(10) "*" +450 PRINT\PRINT "##################################"\PRINT +470 PRINT "I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!" +480 GOTO 520 +510 PRINT "BYE!!!" +520 END diff --git a/dec/HURKLE.BAS b/dec/HURKLE.BAS new file mode 100644 index 0000000..dd95591 --- /dev/null +++ b/dec/HURKLE.BAS @@ -0,0 +1,48 @@ +90 REM *** CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL +100 REM HURKLE - PEOPLE'S COMPUTER COMPANY, MEMLO PARK CA +105 RANDOM +110 N=5 +120 G=10 +210 PRINT +220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE" +230 PRINT "ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A" +240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO" +250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES." +260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE" +270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE." +280 PRINT +285 A=INT(G*RND(0)) +286 B=INT(G*RND(0)) +310 FOR K=1 TO N +320 PRINT "GUESS #";K; +330 INPUT X,Y +340 IF ABS(X-A)+ABS(Y-B)=0 THEN 500 +350 REM PRINT INFO +360 GOSUB 610 +370 PRINT +380 NEXT K +410 PRINT +420 PRINT "SORRY, THAT'S";N;"GUESSES." +430 PRINT "THE HURKLE IS AT ";A;",";B +440 PRINT +450 PRINT "LET'S PLAY AGAIN, HURKLE IS HIDING." +460 PRINT +470 GOTO 285 +500 REM +510 PRINT +520 PRINT "YOU FOUND HIM IN";K;"GUESSES!" +540 GOTO 440 +610 PRINT "GO "; +620 IF Y=B THEN 670 +630 IF YM THEN 380 +340 IF P(I,2)<>N THEN 380 +350 P(I,1)=-1 +360 PRINT "YOU HAVE FOUND MUGWUMP";I +370 GOTO 400 +380 D=SQR((P(I,1)-M)^2+(P(I,2)-N)^2) +390 PRINT "YOU ARE"INT(D*10)/10"UNITS FROM MUGWUMP"I +400 NEXT I +410 FOR J=1 TO 4 +420 IF P(J,1)<>-1 THEN 470 +430 NEXT J +440 PRINT +450 PRINT "YOU GOT THEM ALL IN";T;"TURNS!" +460 GOTO 580 +470 IF T<10 THEN 260 +480 PRINT +490 PRINT "SORRY, THAT'S 10 TRIES. HERE IS WHERE THEY'RE HIDING" +540 FOR I=1 TO 4 +550 IF P(I,1)=-1 THEN 570 +560 PRINT "MUGWUMP";I;"IS AT (";P(I,1);",";P(I,2);")" +570 NEXT I +580 PRINT +600 PRINT "THAT WAS FUN! LET'S PLAY AGAIN......" +610 PRINT "FOUR MORE MUGWUMPS ARE NOW IN HIDING." +630 GOTO 240 +1000 FOR J=1 TO 2 +1010 FOR I=1 TO 4 +1020 P(I,J)=INT(10*RND(0)) +1030 NEXT I +1040 NEXT J +1050 RETURN +1099 END diff --git a/dec/STARS.BAS b/dec/STARS.BAS new file mode 100644 index 0000000..aeacee1 --- /dev/null +++ b/dec/STARS.BAS @@ -0,0 +1,56 @@ +100 REM *** STARS - PEOPLE'S COMPUTER CENTER, MENLO PARK, CA +110 PRINT "STARS - A NUMBER GUESSING GAME" +120 PRINT +130 RANDOMIZE +140 REM *** A IS LIMIT ON NUMBER, M IS NUMBER OF GUESSES +150 LET A=100 +160 LET M=7 +170 PRINTT "DO YOU WANT INSTRUCTIONS (1=YES 0=NO)"; +180 INPUT Z +190 IF Z=0 THEN 280 +200 REM *** INSTRUCTIONS ON HOW TO PLAY +210 PRINT "I AM THINKING OF A WHOLE NUMBER FROM 1 TO";A +220 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS, I" +230 PRINT "WILL TYPE ONE OR MORE STARS (*). THE MORE" +240 PRINT "STARS I TYPE, THE CLOSER YOU ARE TO MY NUMBER." +250 PRINT "ONE STAR (*) MEANS FAR AWAY. SEVEN STARS (*******)" +260 PRINT "MEANS REALLY CLOSE! YOU GET";M;"GUESSES." +270 REM *** COMPUTER 'THINKS' OF A NUMBER +280 PRINT +290 PRINT +300 LET X=INT(A*RND(0)+1) +310 PRINT "OK, I AM THINKING OF A NUMBER. START GUESSING." +320 REM *** GUESSING BEGINS. HUMAN GETS M GUESSES +330 FOR K=1 TO M +340 PRINT +350 PRINT "YOUR GUESS"; +360 INPUT G +370 IF G=X THEN 600 +380 LET D=ABS(X-G) +390 IF D >= 64 THEN 510 +400 IF D >= 32 THEN 500 +410 IF D >= 16 THEN 490 +420 IF D >= 8 THEN 480 +430 IF D >= 4 THEN 470 +440 IF D >= 2 THEN 460 +450 PRINT "*"; +460 PRINT "*"; +470 PRINT "*"; +480 PRINT "*"; +490 PRINT "*"; +500 PRINT "*"; +510 PRINT "*"; +520 PRINT +530 NEXT K +540 REM *** DID NOT GUESS NUMBER IN M GUESSES +550 PRINT +560 PRINT "SORRY, THAT'S";M;"GUESSES. THE NUMBER WAS";X +580 GOTO 280 +590 REM *** WE HAVE A WINNER +600 FOR N=1 TO 50 +610 PRINT "*"; +620 NEXT N +630 PRINT "!!!" +640 PRINT "YOU GOT IT IN";K;"GUESSES!! LET'S PLAY AGAIN..." +650 GOTO 280 +660 END diff --git a/port/CALNDR.BAS b/port/CALNDR.BAS new file mode 100644 index 0000000..f47e173 --- /dev/null +++ b/port/CALNDR.BAS @@ -0,0 +1,56 @@ + 100 REM VALUES FOR 1973; SEE NOTES + 110 ' + 120 FOR I=1 TO 6\ PRINT CHR$(10);\ NEXT I + 130 D=-1 '1973 STARTS ON MON. [0=SUN.,-1=MON.,-2=TUE...] + 140 S=0 + 150 REM: READ DAYS OF EACH MONTH + 155 DIM M(12) + 160 FOR N=0 TO 12 \ READ M(N) \ NEXT N + 170 '''''''' + 180 FOR N=1 TO 12 + 190 PRINT \ PRINT \ S=S+M(N-1) + 200 PRINT "**";S;TAB(7); + 210 FOR I=1 TO 18 \ PRINT "*"; \ NEXT I + 220 ON N GOTO 230,240,250,260,270,280,290,300,310,320,330,340 + 230 PRINT " JANUARY "; \GOTO 350 + 240 PRINT " FEBRUARY"; \GOTO 350 + 250 PRINT " MARCH "; \GOTO 350 + 260 PRINT " APRIL "; \GOTO 350 + 270 PRINT " MAY "; \GOTO 350 + 280 PRINT " JUNE "; \GOTO 350 + 290 PRINT " JULY "; \GOTO 350 + 300 PRINT " AUGUST "; \GOTO 350 + 310 PRINT "SEPTEMBER"; \GOTO 350 + 320 PRINT " OCTOBER "; \GOTO 350 + 330 PRINT " NOVEMBER"; \GOTO 350 + 340 PRINT " DECEMBER"; + 350 FOR I=1 TO 18 \ PRINT "*"; \ NEXT I + 360 PRINT 365-S;"**"; + 370 ' [366-S; ON LEAP YEARS] + 380 PRINT CHR$(10) \ PRINT " S M T W"; + 390 PRINT " T F S" + 400 PRINT + 410 FOR I=1 TO 59 \ PRINT "*"; \ NEXT I + 420 '''' + 430 FOR W=1 TO 6 + 440 PRINT CHR$(10) + 450 PRINT TAB(4); + 460 '' + 470 FOR G=1 TO 7 + 480 D=D+1 + 490 D2=D-S + 500 IF D2>M(N) THEN 580 + 510 IF D2<=0 THEN 520 \ PRINT D2; + 520 PRINT TAB(4+8*G); + 530 NEXT G + 540 '' + 550 IF D2=M(N) THEN 590 + 560 NEXT W + 570 '''' + 580 D=D-G + 590 NEXT N + 600 '''''''' + 610 FOR I=1 TO 6\ PRINT CHR$(10);\ NEXT I + 620 DATA 0,31,28,31,30,31,30,31,31,30,31,30,31 + 630 ' [0,31,29, ..., ON LEAP YEARS] + 640 END diff --git a/port/CHIEF.BAS b/port/CHIEF.BAS new file mode 100644 index 0000000..795aa8a --- /dev/null +++ b/port/CHIEF.BAS @@ -0,0 +1,49 @@ + 10 PRINT " I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD." + 20 PRINT "ARE YOU READY TO TAKE THE TEST YOU CALLED ME OUT FOR"; + 30 INPUT A$ + 40 IF A$="YES" THEN 60 + 50 PRINT "SHUT UP, PALEFACE WITH WISE TONGUE." + 60 PRINT " TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND" + 70 PRINT "MULTIPLY BY 8. DIVIDE BY 5 AND ADD THE SAME. SUBTRACT 1." + 80 PRINT "WHAT DO YOU HAVE"; + 85 PRINT + 90 INPUT B + 100 LET C = (B+1-5)*5/8*5-3 + 110 PRINT "I BET YOUR NUMBER WAS " C" WAS I RIGHT"; + 120 INPUT D$ + 130 IF D$="YES" THEN 510 + 140 PRINT "WHAT WAS YOUR ORIGINAL NUMBER"; + 150 INPUT K + 155 LET F=K+3 + 160 LET G=F/5 + 170 LET H=G*8 + 180 LET I=H/5+5 + 190 LET J=I-1 + 200 PRINT "SO YOU THINK YOU'RE SO SMART, EH?" + 210 PRINT "NOW WATCH...." + 230 PRINT K"PLUS 3 EQUALS "F". THIS DIVIDED BY 5 EQUALS"G"," + 240 PRINT "THIS TIMES 8 EQUALS"H". IF WE DIVIDE BY 5 AND ADD THE SAME," + 250 PRINT "WE GET"I". MINUS 1 EQUALS"J"." + 260 PRINT "NOW DO YOU BELIEVE ME"; + 270 INPUT Z$ + 290 IF Z$="YES" THEN 510 + 295 PRINT "YOU HAVE MADE ME MAD!!!" + 300 PRINT "THERE MUST NOW BE A GREAT LIGHTNING BOLT!" + 310 PRINT\PRINT + 330 FOR X=30 TO 22 STEP -1 + 340 PRINT TAB(X) "X X" + 350 NEXT X + 360 PRINT TAB(21)"X XXX" + 370 PRINT TAB(20) "X X" + 380 PRINT TAB(19) "XX X" + 390 FOR Y=20 TO 13 STEP -1 + 400 PRINT TAB(Y) "X X" + 410 NEXT Y + 420 PRINT TAB(12) "XX" + 430 PRINT TAB(11) "X" + 440 PRINT TAB(10) "*" + 450 PRINT\PRINT "##################################"\PRINT + 470 PRINT "I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!" + 480 GOTO 520 + 510 PRINT "BYE!!!" + 520 END diff --git a/port/HURKLE.BAS b/port/HURKLE.BAS new file mode 100644 index 0000000..c7612df --- /dev/null +++ b/port/HURKLE.BAS @@ -0,0 +1,48 @@ + 90 REM *** CONVERTED TO RSTS/E BY DAVID AHL, DIGITAL + 100 REM HURKLE - PEOPLE'S COMPUTER COMPANY, MEMLO PARK CA + 105 RANDOM + 110 N=5 + 120 G=10 + 210 PRINT + 220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE" + 230 PRINT "ON THE GRID IS POINT 0,0 AND ANY GRIDPOINT IS A" + 240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. TRY TO" + 250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES." + 260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE" + 270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE." + 280 PRINT + 285 A=INT(G*RND(0)) + 286 B=INT(G*RND(0)) + 310 FOR K=1 TO N + 320 PRINT "GUESS #";K; + 330 INPUT X,Y + 340 IF ABS(X-A)+ABS(Y-B)=0 THEN 500 + 350 REM PRINT INFO + 360 GOSUB 610 + 370 PRINT + 380 NEXT K + 410 PRINT + 420 PRINT "SORRY, THAT'S";N;"GUESSES." + 430 PRINT "THE HURKLE IS AT ";A;",";B + 440 PRINT + 450 PRINT "LET'S PLAY AGAIN, HURKLE IS HIDING." + 460 PRINT + 470 GOTO 285 + 500 REM + 510 PRINT + 520 PRINT "YOU FOUND HIM IN";K;"GUESSES!" + 540 GOTO 440 + 610 PRINT "GO "; + 620 IF Y=B THEN 670 + 630 IF YM THEN 380 + 340 IF P(I,2)<>N THEN 380 + 350 P(I,1)=-1 + 360 PRINT "YOU HAVE FOUND MUGWUMP";I + 370 GOTO 400 + 380 D=SQR((P(I,1)-M)^2+(P(I,2)-N)^2) + 390 PRINT "YOU ARE"INT(D*10)/10"UNITS FROM MUGWUMP"I + 400 NEXT I + 410 FOR J=1 TO 4 + 420 IF P(J,1)<>-1 THEN 470 + 430 NEXT J + 440 PRINT + 450 PRINT "YOU GOT THEM ALL IN";T;"TURNS!" + 460 GOTO 580 + 470 IF T<10 THEN 260 + 480 PRINT + 490 PRINT "SORRY, THAT'S 10 TRIES. HERE IS WHERE THEY'RE HIDING" + 540 FOR I=1 TO 4 + 550 IF P(I,1)=-1 THEN 570 + 560 PRINT "MUGWUMP";I;"IS AT (";P(I,1);",";P(I,2);")" + 570 NEXT I + 580 PRINT + 600 PRINT "THAT WAS FUN! LET'S PLAY AGAIN......" + 610 PRINT "FOUR MORE MUGWUMPS ARE NOW IN HIDING." + 630 GOTO 240 +1000 FOR J=1 TO 2 +1010 FOR I=1 TO 4 +1020 P(I,J)=INT(10*RND(0)) +1030 NEXT I +1040 NEXT J +1050 RETURN +1099 END diff --git a/port/STARS.BAS b/port/STARS.BAS new file mode 100644 index 0000000..eac05c2 --- /dev/null +++ b/port/STARS.BAS @@ -0,0 +1,56 @@ + 100 REM *** STARS - PEOPLE'S COMPUTER CENTER, MENLO PARK, CA + 110 PRINT "STARS - A NUMBER GUESSING GAME" + 120 PRINT + 130 RANDOMIZE + 140 REM *** A IS LIMIT ON NUMBER, M IS NUMBER OF GUESSES + 150 LET A=100 + 160 LET M=7 + 170 PRINT "DO YOU WANT INSTRUCTIONS (1=YES 0=NO)"; + 180 INPUT Z + 190 IF Z=0 THEN 280 + 200 REM *** INSTRUCTIONS ON HOW TO PLAY + 210 PRINT "I AM THINKING OF A WHOLE NUMBER FROM 1 TO";A + 220 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS, I" + 230 PRINT "WILL TYPE ONE OR MORE STARS (*). THE MORE" + 240 PRINT "STARS I TYPE, THE CLOSER YOU ARE TO MY NUMBER." + 250 PRINT "ONE STAR (*) MEANS FAR AWAY. SEVEN STARS (*******)" + 260 PRINT "MEANS REALLY CLOSE! YOU GET";M;"GUESSES." + 270 REM *** COMPUTER 'THINKS' OF A NUMBER + 280 PRINT + 290 PRINT + 300 LET X=INT(A*RND(0)+1) + 310 PRINT "OK, I AM THINKING OF A NUMBER. START GUESSING." + 320 REM *** GUESSING BEGINS. HUMAN GETS M GUESSES + 330 FOR K=1 TO M + 340 PRINT + 350 PRINT "YOUR GUESS"; + 360 INPUT G + 370 IF G=X THEN 600 + 380 LET D=ABS(X-G) + 390 IF D >= 64 THEN 510 + 400 IF D >= 32 THEN 500 + 410 IF D >= 16 THEN 490 + 420 IF D >= 8 THEN 480 + 430 IF D >= 4 THEN 470 + 440 IF D >= 2 THEN 460 + 450 PRINT "*"; + 460 PRINT "*"; + 470 PRINT "*"; + 480 PRINT "*"; + 490 PRINT "*"; + 500 PRINT "*"; + 510 PRINT "*"; + 520 PRINT + 530 NEXT K + 540 REM *** DID NOT GUESS NUMBER IN M GUESSES + 550 PRINT + 560 PRINT "SORRY, THAT'S";M;"GUESSES. THE NUMBER WAS";X + 580 GOTO 280 + 590 REM *** WE HAVE A WINNER + 600 FOR N=1 TO 50 + 610 PRINT "*"; + 620 NEXT N + 630 PRINT "!!!" + 640 PRINT "YOU GOT IT IN";K;"GUESSES!! LET'S PLAY AGAIN..." + 650 GOTO 280 + 660 END