Jump to content

Photo

Book : TI games for kids!


46 replies to this topic

#26 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,695 posts
  • Location:Silver Run, Maryland

Posted Mon Feb 26, 2018 7:21 AM

Acie Deucie

Skill area Mathematics
Level: 2,3
 
<snip>
 

Bugs! Do not withdraw right amount! But adds right!

450 STAKE(PLAYER)=STAKE(PLAYER)-3

should be

450 STAKE(PLAYER)=STAKE(PLAYER)-B

...lee



#27 acadiel OFFLINE  

acadiel

    Stargunner

  • 1,404 posts
  • www.hexbus.com
  • Location:USA

Posted Mon Feb 26, 2018 11:42 AM

http://www.hexbus.com/tibooks/
 
ti-games-for-kids_tn.jpg


I really need to look at the metrics to see how much that’s being used.

Probably want to get a mirror copy up somewhere else as well.

#28 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 12:32 PM

Fox and Geese
Skill area: Strategy
Level 2,3
 
"Fox and Geese" is a strategy game only slightly less complex than checkers. It is played on a checker board. Like checkers, all the play is on the light squares and all moves are on the diagonal. One player is the fox. The fox starts on one of the two center squares at one end of the board and moves one square at a time, either forward or backward. The other players are the geese. There are four geese, and these start on the four squares at the other end of the board. They can move one square at a time, but only forward. The geese move first, and then players alternate. There is no jumping or capturing.
 
The geese are to bottle up the fox so he cannot move, and the fox is to break through the line of geese. Once the fox has broken through the line of geese, they can never trap him since they can't move backwards.
 
A checker board is drawn on the screen, with a fox on a white square at the top of the screen, and four geese in the four white squares in the bottom row of the screen. Each square can be identified by a letter-number combination. The eight rows are designated by the letters A through H, and the eight columns by the numbers 1 through 8.
 
In this program, you can choose to play either the fox or the geese, and the computer will play the other. The strategy for both the fox and the geese is built into the program. If you are playing the geese, the word FROM will appear at the bottom of the screen when it is your turn, indicating that you must type in the coordinates of the square that the goose will be moving from. These coordinates must be typed in the form letter-number; for example H 3. Then the word TO appears, and you enter the coordinates of the square that you wish to move the goose to, again in the form letter-number. If the move is a legal move, the goose will be moved. If the move which was entered is illegal for any reason, the computer will make a warning sound and will then give you an opportunity to try again. The fox will then make his move according to the strategy programmed in. You then enter the next move for the geese and so on, until one side or the other has won.
 
When you are playing the fox, the geese move first. Then you indicate where you want the fox to move. Since there is only one fox, there is no need to enter the coordinates of the square the fox is moving from, only the coordinates of the square that the fox is moving to. Again, these must be entered in the form letter-number. If the move is legal, the fox will be moved, and the geese will then take their turn.
 
The strategies for the two sides were developed by programming in a few simple rules and then playing numerous games to identify situations where the computer seemed to be making an inferior move. In such cases, a line was added to the program telling the computer how to move in such a situation. After you play a number of games, you may encounter similar situations where the computer seems to be making a poor move. If you wish, you can then add lines to the program to improve the strategy of the computer.
 
Fox and Geese
100 REM FOX AND GEESE
110 REM
120 CALL CLEAR
130 INPUT "DO YOU WANT TO PLAY THE FOX OR THE GEESE (F OR G)?":Q$
140 IF (Q$="F")+(Q$="G" )THEN 170
150 PRINT "TRY AGAIN."
160 GOTO 130
170 CALL CLEAR
180 CALL COLOR(9,16,16)
190 DIM V(27)
200 CALL CHAR(120,"FFFFFFFFFFFFFFFF")
210 CALL CHAR(104,"0000387C1C0C0C0E")
220 CALL CHAR(105,"0000000000000006")
230 CALL CHAR(106,"1F1F0F0703010300")
240 CALL CHAR(107,"FEFCF8F0E0406000")
250 CALL CHAR(112,"000000000010387C")
260 CALL CHAR(113,"0000000E0E060606")
270 CALL CHAR(114,"7F0F0F0F0C0A0900")
280 CALL CHAR(115,"FEFEFEFE060A1200")
290 FOR N=5 TO 17 STEP 4
300 FOR P=8 TO 20 STEP 4
310 CALL HCHAR(N,P,120,2)
320 CALL HCHAR(N+1,P,120,2)
330 CALL HCHAR(N+2,P+2,120,2)
340 CALL HCHAR(N+3,P+2,120,2)
350 CALL HCHAR(N,P+2,96,2)
360 CALL HCHAR(N+1,P+2,96,2)
370 CALL HCHAR(N+2,P,96,2)
380 CALL HCHAR(N+3,P,96,2)
390 NEXT P
400 NEXT N
410 FOR N=1 TO 8
420 CALL HCHAR(3+2*N,7,64+N)
430 CALL HCHAR(4,6+2*N,48+N)
440 NEXT N
450 CALL COLOR(13,1,1)
460 CALL COLOR(10,2,16)
470 CALL COLOR(11,2,16)
480 CALL HCHAR(21,8,128,16)
490 R=5
500 C=14
510 J=112
520 GOSUB 1690
530 R=19
540 J=104
550 FOR C=8 TO 20 STEP 4
560 GOSUB 1690
570 NEXT C
580 IF Q$="G" THEN 2350
590 KROW=5
600 KCOL=14
610 REM LOOP BEGINS
620 S$=""
630 A=19
640 B=8
650 CALL GCHAR(A,B,G)
660 G$=CHR$(G/8+36)
670 S$=S$&G$
680 B=B+4
690 IF B=24 THEN 720
700 IF B=26 THEN 750
710 GOTO 650
720 B=10
730 A=A-2
740 IF A>4 THEN 650
750 B=8
760 A=A-2
770 IF A>4 THEN 650
780 Z=0
790 IF SEG$(S$,1,8)="00000000" THEN 1650
800 IF SEG$(S$,1,8)="11112000" THEN 1900
810 IF SEG$(S$,1,8)="01111200" THEN 1900
820 IF SEG$(S$,1,8)="00111120" THEN 1940
830 IF (SEG$(S$,1,8)="00001111")*(SEG$(S$,12,1)="0")THEN 1980
840 IF SEG$(S$,1,12)="000011100021" THEN 1940
850 IF SEG$(S$,1,14)="00000100011100" THEN 2060
860 IF SEG$(S$,1,12)="000010000111" THEN 2140
870 IF SEG$(S$,1,14)="00010110010002" THEN 2020
880 IF SEG$(S$,1,18)="000101000110000002" THEN 2060
890 IF SEG$(S$,1,14)="00010100001012" THEN 2100
900 IF SEG$(S$,1,12)="000010002111" THEN 2060
910 IF SEG$(S$,1,8)="00010112" THEN 2180
920 IF SEG$(S$,1,14)="00100110010002" THEN 2020
930 IF SEG$(S$,1,15)="001001100100002" THEN 2180
940 IF SEG$(S$,1,11)="00000110011" THEN 2180
950 IF SEG$(S$,1,18)="001001000110000002" THEN 2060
960 IF SEG$(S$,1,14)="00100100001012" THEN 2100
970 IF SEG$(S$,1,16)="0000011101000000" THEN 2020
980 IF SEG$(S$,1,11)="00000111010" THEN 2220
990 IF SEG$(S$,1,15)="000010100110002" THEN 2180
1000 IF SEG$(S$,1,12)="000000110110" THEN 1980
1010 IF SEG$(S$,1,11)="00101110002" THEN 1940
1020 IF (SEG$(S$,1,1)="1")*(SEG$(S$,5,1)="0")THEN 1740
1030 IF (SEG$(S$,2,1)="1")*(SEG$(S$,6,1)="0")THEN 1780
1040 IF (SEG$(S$,3,1)="1")*(SEG$(S$,7,1)="0")THEN 1820
1050 IF (SEG$(S$,4,1)="1")*(SEG$(S$,8,1)="0")THEN 1860
1060 IF (SEG$(S$,8,1)="1")*(SEG$(S$,12,1)="0")THEN 1980
1070 IF (SEG$(S$,7,1)="1")*(SEG$(S$,11,1)="0")THEN 2020
1080 IF (SEG$(S$,6,1)="1")*(SEG$(S$,10,1)="0")THEN 2100
1090 IF (SEG$(S$,5,1)="1")*(SEG$(S$,9,1)="0")THEN 2140
1100 IF (SEG$(S$,7,1)="1")*(SEG$(S$,12,1)="0")THEN 2180
1110 CALL SOUND(700,700,3)
1120 PRINT "THE FOX WINS"
1130 GOTO 3790
1140 CALL SOUND(100,300,3)
1150 CALL GCHAR(KROW-2,KCOL-2,G)
1160 IF G=96 THEN 1240
1170 CALL GCHAR(KROW-2,KCOL+2,G)
1180 IF G=96 THEN 1240
1190 CALL GCHAR(KROW+2,KCOL-2,G)
1200 IF G=96 THEN 1240
1210 CALL GCHAR(KROW+2,KCOL+2,G)
1220 IF G=96 THEN 1240
1230 GOTO 2330
1240 CALL HCHAR(23,5,32,20)
1250 CALL KEY(0,K,S)
1260 IF (K>64)*(K<73)THEN 1280
1270 GOTO 1250
1280 CALL HCHAR(23,5,K)
1290 CALL SOUND(100,300,3)
1300 CALL KEY(0,KK,S)
1310 IF (KK>48)*(KK<57)THEN 1330
1320 GOTO 1300
1330 CALL HCHAR(23,7,KK)
1340 CALL SOUND(100,300,3)
1350 KROW=K*2-125
1360 KCOL=KK*2-90
1370 CALL GCHAR(KROW,KCOL,G)
1380 IF G=96 THEN 1420
1390 CALL SOUND(500,-3,3)
1400 CALL HCHAR(23,5,32,5)
1410 GOTO 1250
1420 OLDROW=KROW-2
1430 OLDCOL=KCOL-2
1440 CALL GCHAR(OLDROW,OLDCOL,G)
1450 IF G=112 THEN 1560
1460 OLDCOL=KCOL+2
1470 CALL GCHAR(OLDROW,OLDCOL,G)
1480 IF G=112 THEN 1560
1490 OLDROW=KROW+2
1500 CALL GCHAR(OLDROW,OLDCOL,G)
1510 IF G=112 THEN 1560
1520 OLDCOL=KCOL-2
1530 CALL GCHAR(OLDROW,OLDCOL,G)
1540 IF G=112 THEN 1560
1550 GOTO 1390
1560 R=OLDROW
1570 C=OLDCOL
1580 J=96
1590 GOSUB 1690
1600 R=KROW
1610 C=KCOL
1620 J=112
1630 GOSUB 1690
1640 GOTO 610
1650 S$=SEG$(S$,9,24)
1660 Z=Z+1
1670 IF Z=3 THEN 2330
1680 GOTO 790
1690 CALL HCHAR(R,C,J)
1700 CALL HCHAR(R,C+1,J+1)
1710 CALL HCHAR(R+1,C,J+2)
1720 CALL HCHAR(R+1,C+1,J+3)
1730 RETURN
1740 R=19
1750 C=8
1760 CC=10
1770 GOTO 2250
1780 R=19
1790 C=12
1800 CC=14
1810 GOTO 2250
1820 R=19
1830 C=16
1840 CC=18
1850 GOTO 2250
1860 R=19
1870 C=20
1880 CC=22
1890 GOTO 2250
1900 R=19
1910 C=20
1920 CC=18
1930 GOTO 2250
1940 R=17
1950 C=10
1960 CC=12
1970 GOTO 2250
1980 R=17
1990 C=22
2000 CC=20
2010 GOTO 2250
2020 R=17
2030 C=18
2040 CC=16
2050 GOTO 2250
2060 R=15
2070 C=12
2080 CC=10
2090 GOTO 2250
2100 R=17
2110 C=14
2120 CC=12
2130 GOTO 2250
2140 R=17
2150 C=10
2160 CC=8
2170 GOTO 2250
2180 R=17
2190 C=18
2200 CC=20
2210 GOTO 2250
2220 R=17
2230 C=14
2240 CC=16
2250 R=R-4*Z
2260 J=96
2270 GOSUB 1690
2280 R=R-2
2290 C=CC
2300 J=104
2310 GOSUB 1690
2320 GOTO 1140
2330 PRINT "GEESE WIN"
2340 GOTO 3790
2350 REM LOOP BEGINS
2360 FOXROW=5
2370 FOXCOL=14
2380 CALL HCHAR(23,5,70)
2390 CALL HCHAR(23,6,82)
2400 CALL HCHAR(23,7,79)
2410 CALL HCHAR(23,8,77)
2420 CALL KEY(0,R,S)
2430 IF (R>64)*(R<73)THEN 2450
2440 GOTO 2420
2450 CALL SOUND(50,300,3)
2460 CALL HCHAR(23,10,R)
2470 CALL KEY(0,C,S)
2480 IF (C>48)*(C<57)THEN 2500
2490 GOTO 2470
2500 CALL SOUND(50,300,3)
2510 CALL HCHAR(23,12,C)
2520 R=2*R-125
2530 C=2*C-90
2540 CALL GCHAR(R,C,G)
2550 IF G=104 THEN 2590
2560 CALL SOUND(500,-3,3)
2570 CALL HCHAR(23,5,32,20)
2580 GOTO 2380
2590 CALL HCHAR(23,15,84)
2600 CALL HCHAR(23,16,79)
2610 CALL KEY(0,RR,S)
2620 IF (RR>64)*(RR<73)THEN 2640
2630 GOTO 2610
2640 CALL SOUND(50,300,3)
2650 CALL HCHAR(23,18,RR)
2660 CALL KEY(0,CC,S)
2670 IF (CC>48)*(CC<57)THEN 2690
2680 GOTO 2660
2690 CALL SOUND(50,300,3)
2700 CALL HCHAR(23,20,CC)
2710 RR=2*RR-125
2720 CC=2*CC-90
2730 CALL GCHAR(RR,CC,G)
2740 IF G=96 THEN 2760
2750 GOTO 2560
2760 IF R-RR=2 THEN 2780
2770 GOTO 2560
2780 IF ABS(C-CC)=2 THEN 2800
2790 GOTO 2560 ^
2800 CALL HCHAR(R,C,96)
2810 CALL HCHAR(R,C+1,96)
2820 CALL HCHAR(R+1,C,96)
2830 CALL HCHAR(R+1,C+1,96)
2840 CALL HCHAR(RR,CC,104)
2850 CALL HCHAR(RR,CC+1,105)
2860 CALL HCHAR(RR+1,CC,106)
2870 CALL HCHAR(RR+1,CC+1,107)
2880 KOUNT=KOUNT+1
2890 IF KOUNT<3 THEN 3650
2900 N=1
2910 A=F0XR0W-4
2920 B=FOXCOL-8
2930 IF (A>23)THEN 3010
2940 IF B<1 THEN 3010
2950 V(N)=0
2960 CALL GCHAR(A,B,G)
2970 IF G=96 THEN 3000
2980 IF G=128 THEN 3000
2990 GOTO 3010
3000 V(N)=1
3010 B=B+4
3020 IF B=FOXCOL+12 THEN 3060
3030 IF B=FOXCOL+10 THEN 3090
3040 N=N+1 m
3050 GOTO 2930
3060 B=FOXCOL-6
3070 A=A+2
3080 GOTO 3040
3090 B=FOXCOL-8
3100 A=A+2
3110 IF AOFOXROW+8 THEN 3040
3120 IF (V(7)=0)*(V(S)=0)*(V(16)=0)*(V(17)=0)THEN 2330
3130 IF (V(7)=0)*(V(8)=0)*(V(16)=0)THEN 3700
3140 IF (V(7)=0)*(V(8)=0)*(V(17)=0)THEN 3650
3150 IF (V(7)=0)*(V(16)=0)*(V(17)=0)THEN 3600
3160 IF (V(8)=0)*(V(16)=0)*(V(17)=0)THEN 3480
3170 IF (V(17)=1)*(V(21)=1)*(V(22)=1)THEN 3700
3180 IF (V(16)=1)*(V(20)=1)*(V(21)=1)THEN 3650
3190 IF (V(8)=1)*(V(13)=1)*(V(18)=1)*(V(22)=1)*(V(21)=1)*(V(26)=1)*(V(17)=0)THEN 3600
3200 IF (V(7)=1)*(V(11)=1)*(V(15)=1)*(V(20)=1)*(V(21)=1)*(V(25)=1)*(V(16)=0)THEN 3480
3210 IF (V(8)=1)*(V(13)=1)*(V(18)=1)*(V(22)=1)*(V(23)=1) THEN 3600
3220 IF (V(7)=1)*(V(11)=1)*(V(15)=1)*(V(20)=1)*(V(19)=1) THEN 3480
3230 IF (V(17)=1)*(V(21)=1)*(V(25)=1)THEN 3700
3240 IF (V(17)=1)*(V(21)=1)*(V(26)=1)THEN 3700
3250 IF (V(17)=1)*(V(22)=1)*(V(26)=1)THEN 3700
3260 IF (V(17)=1)*(V(22)=1)*(V(27)=1)THEN 3700
3270 IF (V(16)=1)*(V(20)=1)*(V(24)=1)THEN 3650
3280 IF (V(16)=1)*(V(20)=1)*(V(25)=1)THEN 3650
3290 IF (V(16)=1)*(V(21)=1)*(V(25)=1)THEN 3650
3300 IF (V(16)=1)*(V(21)=1)*(V(26)=1)THEN 3650
3310 IF (V(16)=0)*(V(7)=1)*(V(11)=1)*(V(15)=1)*(V(19)=1) THEN 3480
3320 IF (V(7)=1)*(V(11)=1)*(V(15)=1)*(V(20)=1)*(V(23)=1)*(V(25)=1)THEN 3480
3330 IF (V(8)=1)*(V(13)=1)*(V(18)=1)*(V(22)=1)*(V(26)=1)*(V(27)=1)THEN 3600
3340 IF (V(8)=1)*(V(9)=1)*(V(14)=1)*(V(18)=1)*(V(22)=1)*(V(23)=1)THEN 3600
3350 IF (V(7)=1)*(V(6)=1)*(V(10)=1)*(V(15)=1)*(V(19)=1)*(V(20)=1)THEN 3480
3360 IF (V(17)=0)*(V(8)=1)*(V(13)=1)*(V(18)=1)*(V(23)=1)THEN 3600
3370 IF (V(16)=0)*(V(17)=0)*(V(7)=1)*(V(10)=1)THEN 3480
3380 IF (V(16)=0)*(V(17)=0)*(V(8)=1)*(V(14)=1)THEN 3600
3390 IF (V(16)=1)*(V(20)=0)*(V(21)=0)*(V(11)=0)*(V(17)=0)*(V(8)=1)THEN 3600
3400 IF (V(17)=1)*(V(13)=0)*(V(22)=0)*(V(21)=0)*(V(16)=0)*(V(7)=1)THEN 3480
3410 IF (V(21)=0)*(V(22)=0)*(V(18)=0)*(V(17)=1)THEN 3700
3420 IF (V(16)=0)*(V(17)=0)*(V(7)=1)*(V(11)=1)*(V(15)=1)THEN 3480
3430 IF (V(16)=0)*(V(17)=0)*(V(8)=1)*(V(13)=1)*(V(18)=1)THEN 3600
3440 IF (V(16)=1)THEN 3650
3450 IF (V(17)=1)THEN 3700
3460 IF (V(7)=1)THEN 3480
3470 IF (V(6)=1)THEN 3600
3480 CALL HCHAR(FOXROW,FOXCOL,96,2)
3490 CALL HCHAR(FOXROW+1,FOXCOL,96,2)
3500 F0XR0W=F0XR0W-2
3510 F0XC0L=F0XC0L-2
3520 CALL HCHAR(FOXROW,FOXCOL,112)
3530 CALL HCHAR(F0XR0W,F0XC0L+1,113)
3540 CALL HCHAR(F0XR0W+1,F0XC0L,114)
3550 CALL HCHAR(F0XR0W+1,F0XC0L+1,115)
3560 CALL SOUND(50,300,3)
3570 CALL HCHAR(23,5,32,20)
3580 IF FOXROW*2-8>32-KOUNT THEN 1110
3590 GOTO 2380
3600 CALL HCHAR(FOXROW,FOXCOL,96,2)
3610 CALL HCHAR(FOXROW+1,FOXCOL,96,2)
3620 FOXROW=FOXROW-2
3630 FOXCOL=FOXCOL+2
3640 GOTO 3520
3650 CALL HCHAR(FOXROW,FOXCOL,96,2)
3660 CALL HCHAR(FOXROW+1,FOXCOL,96,2)
3670 FOXROW=FOXROW+2
3680 FOXCOL=FOXCOL-2
3690 GOTO 3520
3700 CALL HCHAR(FOXROW,FOXCOL,96,2)
3710 CALL HCHAR(FOXROW+1,FOXCOL,96,2)
3720 FOXROW=FOXROW+2
3730 FOXCOL=FOXCOL+2
3740 GOTO 3520
3750 V(7)=0
3760 GOTO 3280
3770 V(6)=0
3780 GOTO 3280
3790 FOR DELAY=1 TO 700
3800 NEXT DELAY
3810 CALL CLEAR
3820 PRINT "AGAIN (Y OR N)?"::::
3830 CALL KEY(0,K,S)
3840 IF K=78 THEN 3870
3850 IF K=89 THEN 3890
3860 GOTO 3830
3870 CALL CLEAR
3880 END
3890 KOUNT=0
3900 GOTO 120

Should be OK!

And a good game!


Edited by oddemann, Mon Feb 26, 2018 1:01 PM.


#29 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 2:12 PM

Name the States
Skill area: Social Studies
LeveL 2,3
 
How well can you identify the locations of each of the contiguous 48 states of the US? "Name the States" will teach and test your ability to locate states.
 
A map of a section of the United States will appear on the screen. The section of the United States that appears depends on which of the four programs has been selected. Also displayed on
the screen will be the names of all the states included in the map, and sometimes other states as well. Each state has a number associated with it. A square flashes inside one of the states, and you must enter the number corresponding to the name of that state. If a wrong number is entered, the computer makes an unpleasant noise, and you are given another chance. If the correct answer is entered, the screen flashes colors, and then the program goes on to another state. This continues until all of the states on the map have been identified correctly.
 
The maps for these four programs were drawn by placing a piece of tracing paper over a map in an atlas, and then drawing a grid on the tracing paper. This grid corresponds to the coordinates on the screen determined by the CALLHCHAR command. Then the character within each cell of the grid was designed, using the CALL CHAR command.
 
Program 1.Northeastern States
 
100 REM NORTHEASTERN STATES
110 REM
120 CALL CLEAR
130 PRINT "10 NORTH CAROLINA"
140 PRINT "11 NEW HAMPSHIRE"
150 PRINT "12 MASSACHUSETTS"
160 PRINT "13 WEST VIRGINIA"
170 PRINT "14 RHODE ISLAND"
180 PRINT "15 PENNSYLVANIA"
190 PRINT "16 NEW JERSEY"
200 PRINT "17 TENNESSEE"
210 PRINT "18 KENTUCKY"
220 PRINT "19 NEW YORK"
230 PRINT "20 DELAWARE"
240 PRINT "21 VIRGINIA"
250 PRINT "22 GEORGIA"
260 PRINT "23 VERMONT"
270 PRINT "24 INDIANA"
280 PRINT "25 MAINE"
290 PRINT "26 OHIO"
300 PRINT "27 IOWA"
310 PRINT "28 ILLINOIS"
320 PRINT "29 MARYLAND"
330 PRINT "30 CONNECTICUT"
340 PRINT
350 CALL CHAR(91,"F00C040404040404")
360 CALL HCHAR(2,28,91)
370 CALL CHAR(92,"0202020202020101")
380 CALL HCHAR(3,28,92)
390 CALL CHAR(93,"80E020202020203C")
400 CALL HCHAR(4,29,93)
410 CALL CHAR(94,"0402010101020CF0")
420 CALL HCHAR(5,29,94)
430 CALL CHAR(95,"0102040810204080")
440 CALL HCHAR(6,28,95)
450 CALL CHAR(96,"030C30C")
460 CALL HCHAR(7,27,96)
470 CALL CHAR(97,"0000000001010204")
480 CALL HCHAR(7,26,97)
490 CALL CHAR(98,"888848503010F090")
500 CALL HCHAR(8,26,98)
510 CALL CHAR(99,"1008081020403808")
520 CALL HCHAR(9,26,99)
530 CALL CHAR(100,"08040201844A49F0")
540 CALL HCHAR(10,26,100)
550 CALL CHAR(101,"40203030E808F808")
560 CALL HCHAR(10,27,101)
570 CALL CHAR(102,"0000FC2221202121")
580 CALL HCHAR(10,25,102)
590 CALL CHAR(103,"21263CF00000F0C0")
600 CALL HCHAR(11,25,103)
610 CALL CHAR(104,"0102FC")
620 CALL HCHAR(9,25,104)
630 CALL CHAR(105,"0000FF")
640 CALL VCHAR(9,24,105,2)
650 CALL CHAR(106,"08080F0808080808")
660 CALL VCHAR(9,23,106,2)
670 CALL CHAR(107,"0000000F70801FE0")
680 CALL HCHAR(11,24,107)
690 CALL CHAR(108,"0808080808112638")
700 CALL HCHAR(11,23,108)
710 CALL CHAR(109,"899E808FF")
720 CALL HCHAR(12,23,109)
730 CALL CHAR(110,"010618E0")
740 CALL HCHAR(12,24,110)
750 CALL CHAR(111,"0202010101010101")
760 CALL HCHAR(7,25,111)
770 CALL CHAR(112,"4444428282820202")
780 CALL HCHAR(6,25,112)
790 CALL CHAR(113,"01020C384848C844")
800 CALL HCHAR(5,25,113)
810 CALL CHAR(114,"2020202040408080")
820 CALL HCHAR(4,26,114)
830 CALL CHAR(115,"1010101020202020")
840 CALL HCHAR(3,26,115)
850 CALL CHAR(116,"0101020204040808")
860 CALL HCHAR(2,26,116)
870 CALL CHAR(117,"E1121C")
880 CALL HCHAR(2,27,117)
890 CALL CHAR(118,"0000000000000FF0")
900 CALL HCHAR(5,24,118)
910 CALL CHAR(119,"0000000000000102")
920 CALL HCHAR(6,24,119)
930 CALL CHAR(120,"0202020404080808")
940 CALL HCHAR(7,24,120)
950 CALL CHAR(121,"0808080810101010")
960 CALL HCHAR(8,24,121)
970 CALL CHAR(122,"1010FF")
980 CALL HCHAR(9,24,122)
990 CALL CHAR(123,"FF10101010101010")
1000 CALL HCHAR(6,23,123)
1010 CALL CHAR(124,"1010101010101010")
1020 CALL HCHAR(7,23,124)
1030 CALL CHAR(125,"0808080808080808")
1040 CALL HCHAR(8,23,125)
1050 CALL CHAR(126,"0FF")
1060 CALL HCHAR(6,22,126)
1070 CALL CHAR(127,"00030C30C")
1080 CALL HCHAR(6,21,127)
1090 CALL CHAR(128,"0000000001020408")
1100 CALL HCHAR(6,20,128)
1110 CALL CHAR(129,"0810204040404040")
1120 CALL HCHAR(7,20,129)
1130 CALL CHAR(130,"40404040808")
1140 CALL HCHAR(8,20,130)
1150 CALL CHAR(131,"000000000003FC00")
1160 CALL HCHAR(8,19,131)
1170 CALL CHAR(132,"000000000000FF00")
1180 CALL HCHAR(8,18,132)
1190 CALL CHAR(133,"0000000000000F10")
1200 CALL HCHAR(8,17,133)
1210 CALL CHAR(134,"1020202010102040")
1220 CALL HCHAR(9,17,134)
1230 CALL CHAR(135,"408000000000FF00")
1240 CALL HCHAR(10,17,135)
1250 CALL CHAR(136,"000001020C34C7")
1260 CALL HCHAR(10,16,136)
1270 CALL HCHAR(10,18,132,3)
1280 CALL CHAR(137,"000000000000F008")
1290 CALL HCHAR(10,21,137)
1300 CALL CHAR(138,"08040201")
1310 CALL HCHAR(11,21,138)
1320 CALL CHAR(139,"0000000080704E81")
1330 CALL HCHAR(11,22,139)
1340 CALL CHAR(140,"0102020404040201")
1350 CALL HCHAR(12,21,140)
1360 CALL CHAR(141,"0000000000010201")
1370 CALL HCHAR(12,22,141)
1380 CALL CHAR(142,"808040404080")
1390 CALL HCHAR(13,22,142)
1400 CALL CHAR(143,"8040404040808080")
1410 CALL HCHAR(13,23,143)
1420 CALL CHAR(144,"010202040408C848")
1430 CALL HCHAR(14,22,144)
1440 CALL CHAR(145,"0000000000010238")
1450 CALL HCHAR(13,21,145)
1460 CALL CHAR(146,"44C848444A4A4948")
1470 CALL HCHAR(14,21,146)
1480 CALL CHAR(147,"3808000080404040")
1490 CALL HCHAR(15,22,147)
1500 CALL CHAR(148,"424221212020203F")
1510 CALL HCHAR(15,21,148)
1520 CALL CHAR(149,"00FF000018242424")
1530 CALL HCHAR(14,20,149)
1540 CALL CHAR(150,"0000000000000001")
1550 CALL HCHAR(10,15,150)
1560 CALL CHAR(151,"0202020202020202")
1570 CALL VCHAR(11,15,151,3)
1580 CALL CHAR(152,"121320204080")
1590 CALL HCHAR(14,15,152)
1600 CALL CHAR(153,"00FF")
1610 CALL HCHAR(14,16,153)
1620 CALL CHAR(154,"00FF8080838CB0C0")
1630 CALL HCHAR(14,17,154)
1640 CALL CHAR(155,"00FF0018E402314F")
1650 CALL HCHAR(14,18,155)
1660 CALL CHAR(156,"00FF00000000C020")
1670 CALL HCHAR(14,19,156)
1680 CALL CHAR(157,"2020180402020204")
1690 CALL HCHAR(15,19,157)
1700 CALL CHAR(158,"040807")
1710 CALL HCHAR(16,19,158)
1720 CALL CHAR(159,"1414121212121212")
1730 CALL HCHAR(15,20,159)
1740 CALL CHAR(33,"1414937080403804")
1750 CALL HCHAR(16,20,33)
1760 CALL CHAR(34,"0000C02117091212")
1770 CALL HCHAR(16,21,34)
1780 CALL CHAR(35,"40408")
1790 CALL HCHAR(16,22,35)
1800 CALL CHAR(36,"02120A0602040402")
1810 CALL HCHAR(17,20,36)
1820 CALL CHAR(37,"121224242428281")
1830 CALL HCHAR(17,21,37)
1840 CALL CHAR(38,"02010000000000FF")
1850 CALL HCHAR(18,20,38)
1860 CALL CHAR(39,"00008040201010E")
1870 CALL HCHAR(18,21,39)
1880 CALL CHAR(40,"00000000000000FF")
1890 CALL HCHAR(18,16,40,4)
1900 CALL CHAR(41,"F0000000000000FF")
1910 CALL HCHAR(18,15,41)
1920 CALL CHAR(42,"800F0000000000FF")
1930 CALL HCHAR(18,14,42)
1940 CALL CHAR(43,"01060830408000FF")
1950 CALL HCHAR(18,13,43)
1960 CALL CHAR(44,"000000000003040F")
1970 CALL HCHAR(18,12,44)
1980 CALL CHAR(45,"00000000000040A")
1990 CALL HCHAR(17,14,45)
2000 CALL CHAR(46,"0000000000030408")
2010 CALL HCHAR(17,15,46)
2020 CALL CHAR(47,"102020404080")
2030 CALL HCHAR(17,16,47)
2040 CALL CHAR(58,"0002050408081010")
2050 CALL HCHAR(16,16,58)
2060 CALL CHAR(59,"1020C")
2070 CALL HCHAR(16,17,59)
2080 CALL CHAR(60,"0000000001020C10")
2090 CALL HCHAR(15,17,60)
2100 CALL CHAR(61,"42404080")
2110 CALL HCHAR(15,18,61)
2120 CALL CHAR(62,"0808040402020101")
2130 CALL HCHAR(17,13,62)
2140 CALL CHAR(63,"0102020408101008")
2150 CALL HCHAR(16,13,63)
2160 CALL CHAR(64,"0408081020408080")
2170 CALL HCHAR(15,14,64)
2180 CALL CHAR(81,"0000000000010608")
2190 CALL HCHAR(14,14,81)
2200 CALL CHAR(90,"02060A0A0A0A0A12")
2210 CALL HCHAR(13,15,90)
2220 RANDOMIZE
2230 D=4
2240 DIM A(13),PL(4,13),CC$(13)
2250 FOR STATE=1 TO 13
2260 FOR ITEM=1 TO 4
2270 READ PL(ITEM,STATE)
2280 NEXT ITEM
2290 READ CC$ (STATE)
2300 NEXT STATE
2310 FOR N=1 TO 13
2320 R=INT(RND*13+1)
2330 IF A(R)=1 THEN 2320
2340 A(R)=1
2350 ROW=PL(1,R)
2360 COL=PL(2,R)
2370 J=PL(3,R)
2380 JJ=PL(4,R)
2390 CALL CHAR(88,CC$(R))
2400 CALL GCHAR(ROW,COL,G)
2410 CALL HCHAR(ROW,COL,88)
2420 FOR DELAY=1 TO 10
2430 NEXT DELAY
2440 CALL HCHAR(ROW,COL,G)
2450 CALL KEY(0,K,S)
2460 FOR DELAY=1 TO 5
2470 NEXT DELAY
2480 IF (K>48)*(K<52)THEN 2500
2490 GOTO 2410
2500 CALL SOUND(100,300,3)
2510 CALL HCHAR(22,25,K)
2520 CALL HCHAR(ROW,COL,88)
2530 FOR DELAY=1 TO 10
2540 NEXT DELAY
2550 CALL HCHAR(ROW,COL,G)
2560 CALL KEY(0,KK,S)
2570 FOR DELAY=1 TO 10
2580 NEXT DELAY
2590 IF ((KK>47)*(KK<58))THEN 2610
2600 GOTO 2520
2610 CALL HCHAR(22,26,KK)
2620 IF (K=J)*(KK=JJ)THEN 2660
2630 CALL SOUND(300,-3,2)
2640 CALL HCHAR(22,25,32,2)
2650 GOTO 2410
2660 CALL SOUND(100,300,3)
2670 FOR FLASH=1 TO 10
2680 CALL SCREEN(12+D)
2690 FOR DELAY=1 TO 20
2700 NEXT DELAY
2710 D=-D
2720 NEXT FLASH
2730 CALL HCHAR(22,25,32,2)
2740 NEXT N
2750 END
2760 DATA 8,25,49,49,FFFFFFFFFFFFFFFF
2770 DATA 9,25,49,50,0103FFFFFFFFFFFF
2780 DATA 16,15,49,51,FFFFFFFFFFFFFFFF
2790 DATA 10,25,49,52,0000FC3E3F3F3F3F
2800 DATA 12,19,49,53,FFFFFFFFFFFFFFFF
2810 DATA 13,22,49,54,FF7F3F3F7FFFFFFF
2820 DATA 9,21,49,57,FFFFFFFFFFFFFFFF
2830 DATA 15,21,50,48,7E7E3F3F3F3F3F3F
2840 DATA 17,18,50,49,FFFFFFFFFFFFFFF
2850 DATA 6,24,50,51,FFFFFFFFFFFFFFFE
2860 DATA 5,27,50,53,FFFFFFFFFFFFFFFF
2870 DATA 15,20,50,57,FFFFFFFFFFFFFFFF
2880 DATA 10,24,51,48,0000FFFFFFFFFFFF
 
Program 2. Midwestern States
 
100 REM MIDWESTERN STATES
110 REM
120 CALL CLEAR
130 PRINT "10 OHIO"
140 PRINT "11 IOWA"
150 PRINT "12 KANSAS"
160 PRINT "13 INDIANA";
170 PRINT TAB(16);"18 WISCONSIN"
180 PRINT "14 MICHIGAN";
190 PRINT TAB(16);"19 ILLINOIS"
200 PRINT "15 KENTUCKY";
210 PRINT TAB(16);"20 MINNESOTA"
220 PRINT "16 N DAKOTA";
230 PRINT TAB(16);"21 MISSOURI"
240 PRINT "17 S DAKOTA";
250 PRINT TAB(16);"22 NEBRASKA"
260 PRINT ::
270 CALL CHAR(64,"FFFFFFFFFFFFFFFF")
280 CALL CHAR(91,"00000000000060A0")
290 CALL HCHAR(9,28,91)
300 CALL CHAR(92,"2020202020202020")
310 CALL HCHAR(10,28,92)
320 CALL CHAR(93,"2020202040404040")
330 CALL HCHAR(11,28,93)
340 CALL CHAR(94,"40C")
350 CALL HCHAR(12,28,94)
360 CALL CHAR(95,"0000010202040408")
370 CALL HCHAR(12,27,95)
380 CALL CHAR(96,"1020C08080402010")
390 CALL HCHAR(13,27,96)
400 CALL CHAR(97,"101020408080")
410 CALL HCHAR(14,27,97)
420 CALL CHAR(98,"0000000000000102")
430 CALL HCHAR(14,26,98)
440 CALL CHAR(99,"0408F")
450 CALL HCHAR(15,26,99)
460 CALL CHAR(100,"00FC03")
470 CALL HCHAR(13,26,100)
480 CALL CHAR(101,"0106F8")
490 CALL HCHAR(10,27,101)
500 CALL CHAR(102,"C0201F")
510 CALL HCHAR(10,26,102)
520 CALL CHAR(103,"0202040408081020")
530 CALL HCHAR(9,26,103)
540 CALL CHAR(104,"0404040404020202")
550 CALL HCHAR(8,26,104)
560 CALL CHAR(105,"4040800000304888")
570 CALL HCHAR(7,26,105)
580 CALL CHAR(106,"0000000102040407")
590 CALL HCHAR(7,25,106)
600 CALL CHAR(107,"0000008080808080")
610 CALL HCHAR(6,26,107)
620 CALL CHAR(108,"C0300F")
630 CALL HCHAR(6,25,108)
640 CALL CHAR(109,"000000C02OC00000")
650 CALL HCHAR(5,25,109)
660 CALL CHAR(110,"F0101F0000003FC0")
670 CALL HCHAR(5,24,110)
680 CALL CHAR(111,"0304040810204080")
690 CALL HCHAR(6,24,111)
700 CALL CHAR(112,"4181010202020202")
710 CALL HCHAR(7,23,112)
720 CALL CHAR(113,"0202020201010101")
730 CALL HCHAR(8,23,113)
740 CALL CHAR(114,"0101010102020284")
750 CALL HCHAR(9,23,114)
760 CALL CHAR(115,"87B8808080808080")
770 CALL HCHAR(10,23,115)
780 CALL CHAR(116,"FF")
790 CALL HCHAR(10,24,116)
800 CALL CHAR(117,"FF80808080808080")
810 CALL HCHAR(10,25,117)
820 CALL CHAR(118,"8080808080808080")
830 CALL HCHAR(11,25,118)
840 CALL CHAR(119,"0101FF0101010100")
850 CALL HCHAR(9,22,119)
860 CALL CHAR(120,"0102020202010101")
870 CALL HCHAR(8,22,120)
880 CALL CHAR(121,"0502010101010101")
890 CALL HCHAR(7,22,121)
900 CALL CHAR(122,"0404020101020204")
910 CALL HCHAR(6,22,122)
920 CALL CHAR(123,"204080002060A0A0")
930 CALL HCHAR(6,23,123)
940 CALL CHAR(124,"00C33C000000013E")
950 CALL HCHAR(5,23,124)
960 CALL CHAR(125,"0201000000806018")
970 CALL HCHAR(5,22,125)
980 CALL CHAR(126,"00000C142848900F")
990 CALL HCHAR(4,22,126)
1000 CALL CHAR(127,"800000000000031C")
1010 CALL HCHAR(4,21,127)
1020 CALL CHAR(128,"408040300E010000")
1030 CALL HCHAR(5,21,128)
1040 CALL CHAR(129,"880C03")
1050 CALL HCHAR(5,20,129)
1060 CALL CHAR(130,"00030C3040800070")
1070 CALL HCHAR(4,20,130)
1080 CALL CHAR(131,"0000000080402080")
1090 CALL HCHAR(3,21,131)
1100 CALL CHAR(132,"00000000FF")
1110 CALL HCHAR(3,20,132)
1120 CALL HCHAR(4,19,98)
1130 CALL CHAR(133,"0304040810202020")
1140 CALL HCHAR(5,19,133)
1150 CALL CHAR(134,"2010101020404020")
1160 CALL HCHAR(6,19,134)
1170 CALL CHAR(135,"1008040201")
1180 CALL HCHAR(7,19,135)
1190 CALL CHAR(136,"0000000000804040")
1200 CALL HCHAR(7,20,136)
1210 CALL CHAR(137,"C040402020201010")
1220 CALL HCHAR(8,20,137)
1230 CALL CHAR(138,"1008070201010101")
1240 CALL HCHAR(9,20,138)
1250 CALL CHAR(139,"0000FF")
1260 CALL HCHAR(9,21,139)
1270 CALL VCHAR(11,23,118,2)
1280 CALL CHAR(140,"0101010101020203")
1290 CALL HCHAR(13,22,140)
1300 CALL HCHAR(14,23,116)
1310 CALL CHAR(141,"00000102020408F0")
1320 CALL HCHAR(13,24,141)
1330 CALL CHAR(142,"418")
1340 CALL HCHAR(13,25,142)
1350 CALL CHAR(143,"808080804040704F")
1360 CALL HCHAR(12,25,143)
1370 CALL HCHAR(15,23,139,3)
1380 CALL CHAR(144,"C08080FF")
1390 CALL HCHAR(15,22,144)
1400 CALL CHAR(145,"0102020408102040")
1410 CALL HCHAR(14,22,145)
1420 CALL CHAR(146,"2020101008040201")
1430 CALL HCHAR(14,21,146)
1440 CALL CHAR(147,"8080808080804020")
1450 CALL HCHAR(13,21,147)
1460 CALL CHAR(148,"4040201008080403")
1470 CALL HCHAR(12,20,148)
1480 CALL CHAR(149,"1020C04040404040")
1490 CALL EiCHAR(11,20,149)
1500 CALL CHAR(150,"0102040810100808")
1510 CALL HCHAR(10,20,150)
1520 CALL CHAR(151,"8060180601")
1530 CALL HCHAR(3,19,151)
1540 CALL CHAR(152,"231C")
1550 CALL HCHAR(3,18,152)
1560 CALL CHAR(153,"0000000000804020")
1570 CALL HCHAR(2,18,153)
1580 CALL CHAR(154,"00000000FF")
1590 CALL HCHAR(2,17,154)
1600 CALL CHAR(155,"00000000FF404040")
1610 CALL HCHAR(2,16,155)
1620 CALL CHAR(156,"4040404040404040")
1630 CALL HCHAR(3,16,156)
1640 CALL CHAR(157,"2020202020202020")
1650 CALL HCHAR(4,16,157)
1660 CALL CHAR(158,"20202020E0202020")
1670 CALL HCHAR(5,16,158)
1680 CALL VCHAR(6,16,157,2)
1690 CALL CHAR(159,"3F2020202020A060")
1700 CALL HCHAR(8,16,159)
1710 CALL HCHAR(8,17,116,3)
1720 CALL CHAR(33,"2020101010080808")
1730 CALL HCHAR(9,16,33)
1740 CALL CHAR(34,"0404040202020101")
1750 CALL HCHAR(10,16,34)
1760 CALL CHAR(35,"8080FF8080402020")
1770 CALL HCHAR(11,17,35)
1780 CALL HCHAR(11,18,139,2)
1790 CALL VCHAR(12,17,157,2)
1800 CALL CHAR(36,"2020202020E02020")
1810 CALL HCHAR(14,17,36)
1820 CALL CHAR(37,"20203F")
1830 CALL HCHAR(15,17,37)
1840 CALL HCHAR(15,18,139,3)
1850 CALL CHAR(40,"0000C14244447C")
1860 CALL HCHAR(15,21,40)
1870 CALL HCHAR(2,12,154,4)
1880 CALL CHAR(41,"00000000FF808080")
1890 CALL HCHAR(2,11,41)
1900 CALL VCHAR(3,11,118,2)
1910 CALL CHAR(42,"80808080FF808080")
1920 CALL HCHAR(5,11,42)
1930 CALL HCHAR(5,12,154,4)
1940 CALL VCHAR(6,11,118,2)
1950 CALL CHAR(43,"8080FF8080808080")
1960 CALL HCHAR(8,11,43)
1970 CALL HCHAR(8,12,139,3)
1980 CALL CHAR(44,"000000C0300C0300")
1990 CALL HCHAR(8,15,44)
2000 CALL HCHAR(9,11,118)
2010 CALL HCHAR(10,11,116)
2020 CALL CHAR(45,"E02O202020202020")
2030 CALL HCHAR(10,12,45)
2040 CALL CHAR(46,"20202020203F2020")
2050 CALL HCHAR(11,12,46)
2060 CALL CHAR(47,"0000000000FF0000")
2070 CALL HCHAR(11,13,47,4)
2080 CALL VCHAR(12,12,157,2)
2090 CALL HCHAR(14,12,46)
2100 CALL HCHAR(14,13,47,4)
2110 RANDOMIZE
2120 D=4
2130 DIM A(13),PL(4,13)
2140 FOR STATE=1 TO 13
2150 FOR ITEM=1 TO 4
2160 READ PL(ITEM,STATE)
2170 NEXT ITEM
2180 NEXT STATE
2190 FOR N=1 TO 13
2200 R=INT(RND*13+1)
2210 IF A(R)=1 THEN 2200
2220 A(R)=1
2230 ROW=PL(1,R)
2240 COL=PL(2,R)
2250 J=PL(3,R)
2260 JJ=PL(4,R)
2270 CALL HCHAR(ROW,COL,64)
2280 FOR DELAY=1 TO 10
2290 NEXT DELAY
2300 CALL HCHAR(ROW,COL,32)
2310 CALL KEY(0,K,S)
2320 FOR DELAY=1 TO 10
2330 NEXT DELAY
2340 IF (K>48)*(K<51)THEN 2360
2350 GOTO 2270
2360 CALL SOUND(100,300,3)
2370 CALL HCHAR(24,25,K)
2380 CALL HCHAR(ROW,COL,64)
2390 FOR DELAY=1 TO 10
2400 NEXT DELAY
2410 CALL HCHAR(ROW,COL,32)
2420 CALL KEY(0,KK,S)
2430 FOR DELAY=1 TO 10
2440 NEXT DELAY
2450 IF (KK>47)*(KK<58)THEN 2470
2460 GOTO 2380
2470 CALL HCHAR(24,26,KK)
2480 IF (K=J)*(KK=JJ)THEN 2520
2490 CALL SOUND(300,-3,2)
2500 CALL HCHAR(24,25,32,2)
2510 GOTO 2270
2520 CALL SOUND(100,300,3)
2530 FOR FLASH=1 TO 10
2540 CALL SCREEN(12+D)
2550 FOR DELAY=1 TO 25
2560 NEXT DELAY
2570 D=-D
2580 NEXT FLASH
2590 CALL HCHAR(24,25,32,2)
2600 NEXT
2610 END
2620 DATA 14,25,49,53
2630 DATA 13,19,50,49
2640 DATA 11,26,49,48
2650 DATA 9,14,50,50
2660 DATA 13,14,49,50
2670 DATA 8,25,49,52
2680 DATA 9,18,49,49
2690 DATA 3,14,49,54
2700 DATA 6,14,49,55
2710 DATA 7,21,49,56
2720 DATA 11,24,49,51
2730 DATA 5,18,50,48
2740 DATA 11,21,49,57
 
 
Program 3. Southern States
 
100 REM SOUTHERN STATES
110 REM
120 CALL CLEAR
130 PRINT TAB(19);"10 GEORGIA"
140 PRINT TAB(19);"11 ALABAMA" 
150 PRINT TAB(18);"12 ARKANSAS"
160 PRINT TAB(18);"13 KENTUCKY"
170 PRINT TAB(19);"14 FLORIDA"
180 PRINT ::
190 PRINT "15 VIRGINIA"
200 PRINT "16 MISSOURI"
210 PRINT "17 TENNESSEE"
220 PRINT "18 N CAROLINA"
230 PRINT "19 S CAROLINA"
240 PRINT "20 LOUISIANA"
250 PRINT "21 MISSISSIPPI"
260 PRINT 
270 CALL CHAR(46,"FFFFFFFFFFFFFFFF")
280 CALL CHAR(90,"0000001F10101010")
290 CALL HCHAR(5,4,90)
300 CALL CHAR(91,"000000FF00000000")
310 CALL HCHAR(5,5,91,3)
320 CALL CHAR(92,"000000F808081010")
330 CALL HCHAR(5,8,92)
340 CALL CHAR(93,"111F010102020404")
350 CALL HCHAR(6,8,93)
360 CALL CHAR(94,"101020203F404080")
370 CALL HCHAR(5,9,94)
380 CALL CHAR(95,"0000000000030408")
390 CALL HCHAR(4,9,95)
400 CALL CHAR(96,"0F08101020408000")
410 CALL HCHAR(4,10,96)
420 CALL CHAR(97,"0000000000031CE0")
430 CALL HCHAR(3,11,97)
440 CALL CHAR(98,"0102040808F00000")
450 CALL HCHAR(3,12,98)
460 CALL CHAR(99,"000000182C234080")
470 CALL HCHAR(2,13,99)
480 CALL CHAR(100,"0000000000C03F00")
490 CALL HCHAR(2,14,100)
500 CALL CHAR(101,"0000000000609008")
510 CALL HCHAR(2,15,101)
520 CALL CHAR(102,"0808080804040202")
530 CALL HCHAR(3,15,102)
540 CALL CHAR(103,"0100010204081020")
550 CALL HCHAR(4,15,103)
560 CALL CHAR(104,"0080403F")
570 CALL HCHAR(4,16,104)
580 CALL CHAR(105,"18608")
590 CALL HCHAR(4,17,105)
600 CALL CHAR(106,"0101020202040404")
610 CALL HCHAR(3,17,106)
620 CALL CHAR(107,"0102040810204080")
630 CALL HCHAR(2,18,107)
640 CALL CHAR(108,"000000000E314080")
650 CALL HCHAR(1,19,108)
660 CALL CHAR(109,"000000000000C030")
670 CALL HCHAR(1,20,109)
680 CALL CHAR(110,"1010202020380C03")
690 CALL HCHAR(2,20,110)
700 CALL CHAR(111,"C020101010101008")
710 CALL HCHAR(3,21,111)
720 CALL CHAR(112,"080402020101FF01")
730 CALL HCHAR(4,21,112)
740 CALL CHAR(113,"8080404040408080")
750 CALL HCHAR(5,22,113)
760 CALL CHAR(114,"0102040810204080")
770 CALL HCHAR(6,21,114)
780 CALL CHAR(115,"01010202040408F0")
790 CALL HCHAR(7,20,115)
800 CALL CHAR(116,"0502040404080810")
810 CALL HCHAR(8,19,116)
820 CALL CHAR(117,"20408")
830 CALL HCHAR(9,19,117)
840 CALL CHAR(118,"00000001020C1020")
850 CALL HCHAR(9,18,118)
860 CALL CHAR(119,"408")
870 CALL HCHAR(10,18,119)
880 CALL CHAR( 120, "1008050202040408")
890 CALL HCHAR(10,17,120)
900 CALL CHAR(121,"0810101010101010")
910 CALL HCHAR(11,17,121)
920 CALL CHAR(122, "F010080808080808")
930 CALL HCHAR(12,17,122)
940 CALL CHAR(123,"0404040202020101")
950 CALL HCHAR(13,17,123)
960 CALL CHAR(124,"8040402020101008")
970 CALL HCHAR(14,18,124)
980 CALL CHAR(125,"0804040202020101")
990 CALL HCHAR(15,18,125)
1000 CALL CHAR(126,"8080404020202010")
1010 CALL HCHAR(16,19,126)
1020 CALL CHAR(127,"1010101020202040")
1030 CALL HCHAR(17,19,127)
1040 CALL CHAR(128,"40404080")
1050 CALL HCHAR(18,19,128)
1060 CALL CHAR(129,"80402020130C")
1070 CALL HCHAR(18,18,129)
1080 CALL CHAR(130,"8040201008040201")
1090 CALL HCHAR(17,17,130)
1100 CALL HCHAR(16,16,123)
1110 CALL CHAR(131,"2020202010100808")
1120 CALL HCHAR(15,16,131)
1130 CALL CHAR(132,"8040202020202020")
1140 CALL HCHAR(14,16,132)
1150 CALL HCHAR(13,15,130)
1160 CALL CHAR(133,"071820408")
1170 CALL HCHAR(13,14,133)
1180 CALL CHAR(134,"804020100F")
1190 CALL HCHAR(13,13,134)
1200 CALL CHAR(135,"FF0000000000F807")
1210 CALL HCHAR(12,12,135)
1220 CALL CHAR(136,"3F20202020203FC")
1230 CALL HCHAR(12,11,136)
1240 CALL CHAR(137,"202020202225F101")
1250 CALL HCHAR(12,10,137)
1260 CALL CHAR(138,"8080808080808FF0")
1270 CALL HCHAR(12,9,138)
1280 CALL HCHAR(13,9,113)
1290 CALL CHAR(139,"FF")
1300 CALL HCHAR(14,8,139)
1310 CALL CHAR(140,"000000000080403F")
1320 CALL HCHAR(13,7,140)
1330 CALL CHAR(141,"0000000FF1")
1340 CALL HCHAR(13,6,141)
1350 CALL CHAR(142,"000000F00F")
1360 CALL HCHAR(13,5,142)
1370 CALL CHAR(143,"01010203")
1380 CALL HCHAR(13,4,143)
1390 CALL CHAR(144,"4040404080808080")
1400 CALL HCHAR(12,5,144)
1410 CALL CHAR(145,"8080804040404040")
1420 CALL HCHAR(11,5,145)
1430 CALL CHAR(146,"0202020202020101")
1440 CALL HCHAR(10,4,146)
1450 CALL CHAR(147,"0202020203020202")
1460 CALL HCHAR(9,4,147)
1470 CALL CHAR(148,"1010101010101E02")
1480 CALL HCHAR(8,4,148)
1490 CALL CHAR(149,"1010101010101010")
1500 CALL VCHAR(6,4,149,2)
1510 CALL CHAR(150,"00000000FF000000")
1520 CALL HCHAR(9,5,150,2)
1530 CALL CHAR(152,"08080808F8080808")
1540 CALL HCHAR(9,7,152)
1550 CALL CHAR(153,"0804040408081010")
1560 CALL HCHAR(10,7,153)
1570 CALL CHAR(154,"1010202040408080")
1580 CALL HCHAR(11,7,154)
1590 CALL CHAR(155,"FF")
1600 CALL HCHAR(12,7,155,2)
1610 CALL CHAR(156,"0101020204040808")
1620 CALL HCHAR(8,7,156)
1630 CALL CHAR(157,"08081F1020204080")
1640 CALL HCHAR(7,8,157)
1650 CALL CHAR(158,"0000FF")
1660 CALL HCHAR(7,9,158)
1670 CALL CHAR(159,"0000FF2020202020"
1680 CALL HCHAR(7,10,159)
1690 CALL CHAR(33,"2020202020202020")
1700 CALL VCHAR(8,10,33,4)
1710 CALL HCHAR(7,11,158,2)
1720 CALL CHAR(34,"0000FF8080808040")
1730 CALL HCHAR(7,13,34)
1740 CALL CHAR(35,"404040402020202")
1750 CALL HCHAR(8,13,35)
1760 CALL CHAR(36,"2020101010080808")
1770 CALL HCHAR(9,13,36)
1780 CALL CHAR(37,"0804040202040404")
1790 CALL HCHAR(10,13,37)
1800 CALL CHAR(38,"0404040404040404")
1810 CALL HCHAR(11,13,38)
1820 CALL CHAR(39,"FC0407")
1830 CALL HCHAR(12,13,39)
1840 CALL HCHAR(12,14,158,2)
1850 CALL CHAR(40,"0302F20A0C")
1860 CALL HCHAR(12,16,40)
1870 CALL CHAR(41,"00000704FC")
1880 CALL HCHAR(5,10,41)
1890 CALL HCHAR(5,11,158,4)
1900 CALL CHAR(42,"407F80000000030C")
1910 CALL HCHAR(5,15,42)
1920 CALL CHAR(43,"00FF081020408000")
1930 CALL HCHAR(5,16,43)
1940 CALL CHAR(44,"00FF")
1950 CALL HCHAR(5,17,44)
1960 CALL HCHAR(5,18,155,2)
1970 CALL CHAR(45,"00000000000000FF")
1980 CALL HCHAR(4,20,45)
1990 CALL CHAR(47,"081020C0")
2000 CALL HCHAR(6,15,47)
2010 CALL CHAR(58,"0000000106182020")
2020 CALL HCHAR(6,14,58)
2030 CALL CHAR(59,"407FC")
2040 CALL HCHAR(7,14,59)
2050 CALL CHAR(60,"07F8202010080402")
2060 CALL HCHAR(7,15,60)
2070 CALL CHAR(61,"0201")
2080 CALL HCHAR(8,15,61)
2090 CALL CHAR(62,"0000804020100804")
2100 CALL HCHAR(8,16,62)
2110 CALL HCHAR(9,16,61)
2120 CALL CHAR(63,"0000804040202010")
2130 CALL HCHAR(9,17,63)
2140 CALL HCHAR(6,16,45)
2150 CALL CHAR(64,"00000000000000F")
2160 CALL HCHAR(6,17,64)
2170 CALL CHAR(81,"101F")
2180 CALL HCHAR(7,17,81)
2190 CALL CHAR(87,"00FC03")
2200 CALL HCHAR(7,18,87)
2210 CALL HCHAR(7,19,62)
2220 RANDOMIZE
2230 D=4
2240 DIM A(11),PL(4,11)
2250 FOR STATE=1 TO 11
2260 FOR ITEM=1 TO 4
2270 READ PL(ITEM,STATE)
2280 NEXT ITEM
2290 NEXT STATE
2300 FOR N=1 TO 11
2310 R=INT(RND*11+1)
2320 IF A(R)=1 THEN 2310
2330 A(R)=1
2340 ROW=PL(1,R)
2350 COL=PL(2,R)
2360 J=PL(3,R)
2370 JJ=PL(4,R)
2380 CALL HCHAR(ROW,COL,46)
2390 FOR DELAY=1 TO 10
2400 NEXT DELAY
2410 CALL HCHAR(ROW,COL,32)
2420 CALL KEY(0,K,S)
2430 FOR DELAY=1 TO 10
2440 NEXT DELAY
2450 IF (K>48)*(K<51)THEN 2470
2460 GOTO 2380
2470 CALL SOUND(100,300,3)
2480 CALL HCHAR(23,25,K)
2490 CALL HCHAR(ROW,COL,46)
2500 FOR DELAY=1 TO 10
2510 NEXT DELAY
2520 CALL HCHAR(ROW,COL,32)
2530 CALL KEY(0,KK,S)
2540 FOR DELAY=1 TO 10
2550 NEXT DELAY
2560 IF ((KK>47)*(KK<58))THEN 2580
2570 GOTO 2490
2580 CALL HCHAR(23,26,KK)
2590 IF (K=J)*(KK=JJ)THEN 2630
2600 CALL SOUND(300,-3, 2)
2610 CALL HCHAR(23,25,32,2)
2620 GOTO 2380
2630 CALL SOUND(100,300,3)
2640 FOR FLASH=1 TO 10
2650 CALL SCREEN(12+D)
2660 FOR DELAY=1 TO 30
2670 NEXT DELAY
2680 D=-D
2690 NEXT FLASH
2700 CALL HCHAR(23,25,32,2)
2710 NEXT N
2720 END
2730 DATA 3,19,49,53
2740 DATA 6,19,49,56
2750 DATA 8,17,49,57
2760 DATA 10,15,49,48
2770 DATA 14,17,49,52
2780 DATA 10,12,49,49
2790 DATA 6,12,49,55
2800 DATA 4,13,49,51
2810 DATA 9,9,50,49
2820 DATA 12,6,50,48
2830 DATA 7,6,49,50
 
 
Program 4.Western States
 
100 REM WESTERN STATES
110 REM
120 CALL CLEAR
130 PRINT "11 UTAH"
140 PRINT "12 TEXAS"
150 PPINT "13 IDAHO"
160 PRINT "14 NEVADA"
170 PRINT "15 KANSAS"
180 PRINT "16 OREGON"
190 PRINT "17 MONTANA"
200 PRINT "18 ARIZONA"
210 PRINT TAB(15);"24 N DAKOTA"
220 PRINT "19 WYOMING";
230 PRINT TAR(15);"25 S DAKOTA"
240 PRINT "21 NEBRASKA";
250 PRINT TAB(15);"26 CALIFORNIA"
260 PRINT "22 OKLAHOMA";
270 PRINT TAB(15);"27 NEW MEXICO"
280 PRINT "23 COLORADO";
290 PRINT TAB (15); "28 V/ASHINGTON"
300 PRINT
310 CALL CHAP(81,"FFFFFFFFFFFFFFFF")
320 CALL CHAR(91,"01020282C4B88080")
330 CALL HCHAR(2,12,91)
340 CALL CHAR(92,"C03C03")
350 CALL HCHAR(2,13,92)
360 CALL CHAR(93,"0000F00F")
370 CALL HCHAR(2,14,93)
380 CALL CHAR(94,"000000E09F909090")
390 CALL HCHAR(2,15,94)
400 CALL CHAR(95,"0000000000FC03")
410 CALL HCHAR(2,16,95)
420 CALL CHAR(96,"000000000000FF")
430 CALL HCHAR(2,17,96)
440 CALL CHAR(97,"00000000000000FF")
450 CALL HCHAR(2,18,97,3)
460 CALL HCHAR(2,21,96)
470 CALL CHAR(99,"000000000000FF00")
480 CALL HCHAR(2,22,99)
490 CALL CHAR(100,"000000000000C040")
500 CALL HCHAR(2,23,100)
510 CALL CHAR(101,"0000000001010102")
520 CALL HCHAR(3,11,101)
530 CALL CHAR(102,"8080808080601010")
540 CALL HCHAR(3,12,102)
550 CALL CHAR(103,"0101010101010202")
560 CALL HCHAR(3,14,103)
570 CALL CHAR(104,"1010080804040202")
580 CALL HCHAR(3,15,104)
590 CALL CHAR(105,"2020202020202020")
600 CALL HCHAR(3,20,105)
610 CALL CHAR(106,"4040202020201010")
620 CALL HCHAR(3,23,106)
630 CALL CHAR(107,"0202040404040808")
640 CALL HCHAR(4,11,107)
650 CALL CHAR(108,"101F")
660 CALL HCHAR(4,12,108)
670 CALL CHAR(109,"00FF")
680 CALL HCHAR(4,13,109)
690 CALL CHAR(110,"02FE020101020204")
700 CALL HCHAR(4,14,110)
710 CALL CHAR(111,"0201010101010101")
720 CALL HCHAR(4,15,111)
730 CALL CHAR(112,"20202020203F2020")
740 CALL HCHAR(4,20,112)
750 CALL CHAR(113,"0000000000FF0000")
760 CALL HCHAR(4,21,113,2)
770 CALL CHAR(114, "1010101010F01010")
780 CALL HCHAR(4,23,114)
790 CALL CHAR(115,"1020202040404040")
800 CALL HCHAR(5,11,115)
810 CALL CHAR(116,"0204040404040404")
820 CALL HCHAR(5,14,116)
830 CALL CHAR(117,"8040201F")
840 CALL HCHAR(5,16,117)
850 CALL CHAR(118,"00007FC040404040")
860 CALL HCHAR(5,17,118)
870 CALL CHAR(119,"0000FF")
880 CALL HCHAR(5,18,119,2)
890 CALL CHAR(120,"2020E02020202020")
900 CALL HCHAR(5,20,120)
910 CALL CHAR(121,"0808080808040404")
920 CALL HCHAR(5,23,121)
930 CALL CHAR(122,"40407F408080808O")
940 CALL HCHAR(6,11,122)
950 CALL CHAR(123,"0000F00F")
960 CALL HCHAR(6,12,123)
970 CALL CHAR(124,"000000F04F404080")
980 CALL HCHAR(6,13,124)
990 CALL CHAR(125,"0404040404FC0300")
1000 CALL HCHAR(6,14,125)
1010 CALL CHAR(126,"000000000000F00F")
1020 CALL HCHAR(6,15,126)
1030 CALL HCHAR(6,16,97)
1040 CALL CHAR(128,"40404040404040C0")
1050 CALL HCHAR(6,17,128)
1060 CALL CHAR(129,"202020203F202020")
1070 CALL HCHAR(6,20,129)
1080 CALL CHAR(130,"00000000FF")
1090 CALL HCHAR(6,21,130,2)
1100 CALL CMAR(132,"04020202FF020L01")
1110 CALL HCHAR(6,23,132)
1120 CALL CHAR(133,"8080808080808080")
1130 CALL HCHAR(7,11,133)
1140 CALL HCHAR(7,13,133)
1150 CALL CHAR(135,"0404040404040404")
1160 CALL VCHAR(7,15,135,3)
1170 CALL CHAR(136,"4040404040407F00")
1180 CALL HCHAR(7,17,136)
1190 CALL CHAR(98,"000000000000FF80")
1200 CALL HCHAR(7,18,98)
1210 CALL HCHAR(7,19,96)
1220 CALL CHAR(139,"202020202020FF00")
1230 CALL HCHAR(7,20,139)
1240 CALL CHAR(140,"000000000000E020")
1250 CALL HCHAR(7,21,140)
1260 CALL CHAR(141,"8080404040202020")
1270 CALL HCHAR(7,24,141)
1280 CALL HCHAR(8,11,141)
1290 CALL CHAR(143,"8080808040402020")
1300 CALL HCHAR(8,13,143)
1310 CALL VCHAR(8,18,133,2)
1320 CALL CHAR(146,"20203F2020202020")
1330 CALL HCHAR(8,21,146)
1340 CALL CHAR(147,"0000FF")
1350 CALL HCHAR(8,22,147,2)
1360 CALL CHAR(149,"2020F01008040202")
1370 CALL HCHAR(8,24,149)
1380 CALL CHAR(150,"0808040402020101")
1390 CALL HCHAR(9,11,150)
1400 CALL CHAR(151,"2010080402010000")
1410 CALL HCHAR(9,13,151)
1420 CALL CHAR(152,"0000000000008040")
1430 CALL HCHAR(9,14,152)
1440 CALL HCHAR(9,21,105)
1450 CALL CHAP(34,"0201010101010101")
1460 CALL HCHAR(9,24,34)
1470 CALL CHAR(157,"0080808080404040")
1480 CALL HCHAR(10,12,157)
1490 CALL CHAR(158,"2010080402010100")
1500 CALL HCHAR(10,14,158)
1510 CALL CHAR(159,"0407080310204080")
1520 CALL HCHAR(10,15,159)
1530 CALL CHAR(127,"00FF")
1540 CALL HCHAR(10,16,127,2)
1550 CALL CHAR(131,"80FF808080808080")
1560 CALL HCHAR(10,18,131)
1570 CALL HCHAR(10,19,127,2)
1580 CALL CHAR(35,"20FF8080FF808080")
1590 CALL VCHAR(11,21,133,2)
1600 CALL HCHAR(10,21,35)
1610 CALL CHAR(36,"00FF0000F0101010")
1620 CALL HCHAR(10,22,36)
1630 CALL CHAR(37,"00FF")
1640 CALL HCHAR(10,23,37,2)
1650 CALL CHAR(38,"8080808040402020")
1660 CALL HCHAR(10,25,38)
1670 CALL CHAR(39,"20180601")
1680 CALL HCHAR(11,12,39)
1690 CALL CHAR(40,"0000000080402010")
1700 CALL HCHAR(11,13,40)
1710 CALL CHAR(41,"8040402020404040")
1720 CALL HCHAR(11,15,41)
1730 CALL VCHAR(11,18,133,2)
1740 CALL CHAR(43,"1010101010101F00")
1750 CALL HCHAR(11,22,43)
1760 CALL CHAR(44,"00000000000000FF")
1770 CALL HCHAR(11,23,44)
1780 CALL CHAR(45,"FF" )
1790 CALL HCHAR(12,24,45)
1800 CALL CHAR(46,"20202020202020F0")
1810 CALL HCHAR(11,25,46)
1820 CALL CHAR(47,"0804040407000000")
1830 CALL HCHAR(12,13,47)
1840 CALL HCHAR(12,14,130)
1850 CALL CHAR(48,"4040408080C02010")
1860 CALL HCHAR(12, 15,48)
1870 CALL CHAR(58,"0808040402020101")
1880 CALL HCHAR(12, 25,58)
1890 CALL CHAR(60,"0C03")
1900 CALL HCHAR(13( 15,60)
1910 CALL CHAR(61,"0000C0300C03")
1920 CALL HCHAR(13,16,61)
1930 CALL HCHAR(13,17,96)
1940 CALL CHAR(63,"808080809F90F000")
1950 CALL HCHAR(13,18,63)
1960 CALL CHAR(64,"00007F40C0201807")
1970 CALL HCHAR(13,19,64)
1980 CALL HCHAR(13,20,147)
1990 CALL CHAR(134,"808080")
2000 CALL HCHAR(13,21,134)
2010 CALL CHAR(137,"8080404040404040")
2020 CALL HCHAR(13,26,137)
2030 CALL CHAR(138,"8080804020101008")
2040 CALL HCHAR(14,20,138)
2050 CALL CHAR(142,"0906")
2060 CALL HCHAR(15,20,142)
2070 CALL CHAR(33,"0000000010234080")
2080 CALL HCHAR(14,21,33)
2090 CALL CHAR(144,"000000000000C060")
2100 CALL HCHAR(14,22,144)
2110 CALL CHAR(145,"2010100004040201")
2120 CALL HCHAR(15,22,145)
2130 CALL CHAR(148,"8040300C03")
2140 CALL HCHAR(16,23,148)
2150 CALL CHAR(153,"1010080808887000")
2160 CALL HCHAR(16,24,153)
2170 CALL CHAR(154,"0304040808081010")
2180 CALL HCHAR(15,24,154)
2190 CALL CHAR(155,"00090A0C10204080")
2200 CALL HCHAR(14,25,155)
2210 CALL CHAR(156,"40C")
2220 CALL HCHAR(14,26,156)
2230 RANDOMIZE
2240 D=4
2250 DIM A(17),PL(4,17)
2260 FOR STATE=1 TO 17
2270 FOR :[TEM=1 TO 4
2280 READ PL(ITEM.STATE)
2290 NEXT ITEM
2300 NEXT STATE
2310 FOR N=1 TO 17
2320 R=INT(RND*17+1)
2330 IF A(R)=1 THEN 2320
2340 A(R)=1
2350 ROW=PL(1,R)
2360 COL=PL(2,R)
2370 J=PL(3,R)
2380 JJ=PL(4,R)
2390 CALL HCHAR(ROW,COL, 81)
2400 FOR DELAY=1 TO 10
2410 NEXT DELAY
2420 CALL HCHAR(ROW,COL,32)
2430 CALL KEY(0,K,S)
2440 FOR DELAY=1 TO 10
2450 NEXT DELAY
2460 IF (K>48)*(K<51)THEN 2480
2470 GOTO 2390
2480 CALL SOUND(100,300,3)
2490 CALL HCHAR(24,25,K)
2500 CALL HCHAR(ROW,COL,81)
2510 FOR DELAY=1 TO 10
2520 NEXT DELAY
2530 CALL HCHAR(ROW,COL,32)
2 540 CALL KEY(0,KK,S)
2550 FOR DELAY=1 TO 10
2560 NEXT DELAY
2570 IF (KK>48)*(KK<58)THEN 2590
2580 GOTO 2 500
2590 CALL HCHAR(24,26,KK)
2600 IF (K=J)*(KK=JJ)THEN 2640
2610 CALL SOUND(300,-3,2)
2620 CALL HCHAR(24,2 5,32,2)
2630 GOTO 2390
2640 CALL SOUND(100,300,2)
2650 FOR FLASH=1 TO 10
2660 CALL SCREEN(12+D)
2670 FOR DELAY=1 TO 30
2680 NEXT DELAY
2690 D=-D
2700 NEXT FLASH
2710 CALL HCHAR(24,25,32,2)
2720 NEXT N
2730 END
2740 DATA 8,16,49,49
2750 DATA 11,16,49,56
2760 DATA 3,13,50,56
2770 DATA 3,21,50,52
2780 DATA 5,22,50,53
2790 DATA 13,23,49,50
2800 DATA 9,19,50,51
2810 DATA 9,22,49,53
2820 DATA 11,19,50,55
2830 DATA 6,18,49,57
2840 DATA 8,14,49,52
2850 DATA 9,12,50,54
2860 DATA 11,24,50,50
2870 DATA 5,15,49,51
2880 DATA 5,13,49,54
2890 DATA 4,19,49,55
2900 DATA 7,22,50,49

NOT debugged!!! Yet!


Edited by oddemann, Mon Feb 26, 2018 3:35 PM.


#30 TheBF OFFLINE  

TheBF

    Dragonstomper

  • 616 posts
  • Location:The Great White North

Posted Mon Feb 26, 2018 2:47 PM

Edited version corrects a number of typo-graphical errors.  Seems to work now.

 

Thanks for putting these up here Oddeman

 

Program 1.Northeastern States

100 REM NORTHEASTERN STATES
110 REM
120 CALL CLEAR
130 PRINT "10 NORTH CAROLINA"
140 PRINT "11 NEW HAMPSHIRE"
150 PRINT "12 MASSACHUSETTS"
160 PRINT "13 WEST VIRGINIA"
170 PRINT "14 RHODE ISLAND"
180 PRINT "15 PENNSYLVANIA"
190 PRINT "16 NEW JERSEY"
200 PRINT "17 TENNESSEE"
210 PRINT "18 KENTUCKY"
220 PRINT "19 NEW YORK"
230 PRINT "20 DELAWARE"
240 PRINT "21 VIRGINIA"
250 PRINT "22 GEORGIA"
260 PRINT "23 VERMONT"
270 PRINT "24 INDIANA"
280 PRINT "25 MAINE"
290 PRINT "26 OHIO"
300 PRINT "27 IOWA"
310 PRINT "28 ILLINOIS"
320 PRINT "29 MARYLAND"
330 PRINT "30 CONNECTICUT"
340 PRINT
350 CALL CHAR(91,"F00C040404040404")
360 CALL HCHAR(2,28,91)
370 CALL CHAR(92,"0202020202020101")
380 CALL HCHAR(3,28,92)
390 CALL CHAR(93,"80E020202020203C")
400 CALL HCHAR(4,29,93)
410 CALL CHAR(94,"0402010101020CF0")
420 CALL HCHAR(5,29,94)
430 CALL CHAR(95,"0102040810204080")
440 CALL HCHAR(6,28,95)
450 CALL CHAR(96,"030C30C")
460 CALL HCHAR(7,27,96)
470 CALL CHAR(97,"0000000001010204")
480 CALL HCHAR(7,26,97)
490 CALL CHAR(98,"888848503010F090")
500 CALL HCHAR(8,26,98)
510 CALL CHAR(99,"1008081020403808")
520 CALL HCHAR(9,26,99)
530 CALL CHAR(100,"08040201844A49F0")
540 CALL HCHAR(10,26,100)
550 CALL CHAR(101,"40203030E808F808")
560 CALL HCHAR(10,27,101)
570 CALL CHAR(102,"0000FC2221202121")
580 CALL HCHAR(10,25,102)
590 CALL CHAR(103,"21263CF00000F0C0")
600 CALL HCHAR(11,25,103)
610 CALL CHAR(104,"0102FC")
620 CALL HCHAR(9,25,104)
630 CALL CHAR(105,"0000FF")
640 CALL VCHAR(9,24,105,2)
650 CALL CHAR(106,"08080F0808080808")
660 CALL VCHAR(9,23,106,2)
670 CALL CHAR(107,"0000000F70801FE0")
680 CALL HCHAR(11,24,107)
690 CALL CHAR(108,"0808080808112638")
700 CALL HCHAR(11,23,108)
710 CALL CHAR(109,"899E808FF")
720 CALL HCHAR(12,23,109)
730 CALL CHAR(110,"010618E0")
740 CALL HCHAR(12,24,110)
750 CALL CHAR(111,"0202010101010101")
760 CALL HCHAR(7,25,111)
770 CALL CHAR(112,"4444428282820202")
780 CALL HCHAR(6,25,112)
790 CALL CHAR(113,"01020C384848C844")
800 CALL HCHAR(5,25,113)
810 CALL CHAR(114,"2020202040408080")
820 CALL HCHAR(4,26,114)
830 CALL CHAR(115,"1010101020202020")
840 CALL HCHAR(3,26,115)
850 CALL CHAR(116,"0101020204040808")
860 CALL HCHAR(2,26,116)
870 CALL CHAR(117,"E1121C")
880 CALL HCHAR(2,27,117)
890 CALL CHAR(118,"0000000000000FF0")
900 CALL HCHAR(5,24,118)
910 CALL CHAR(119,"0000000000000102")
920 CALL HCHAR(6,24,119)
930 CALL CHAR(120,"0202020404080808")
940 CALL HCHAR(7,24,120)
950 CALL CHAR(121,"0808080810101010")
960 CALL HCHAR(8,24,121)
970 CALL CHAR(122,"1010FF")
980 CALL HCHAR(9,24,122)
990 CALL CHAR(123,"FF10101010101010")
1000 CALL HCHAR(6,23,123)
1010 CALL CHAR(124,"1010101010101010")
1020 CALL HCHAR(7,23,124)
1030 CALL CHAR(125,"0808080808080808")
1040 CALL HCHAR(8,23,125)
1050 CALL CHAR(126,"0FF")
1060 CALL HCHAR(6,22,126)
1070 CALL CHAR(127,"00030C30C")
1080 CALL HCHAR(6,21,127)
1090 CALL CHAR(128,"0000000001020408")
1100 CALL HCHAR(6,20,128)
1110 CALL CHAR(129,"0810204040404040")
1120 CALL HCHAR(7,20,129)
1130 CALL CHAR(130,"40404040808")
1140 CALL HCHAR(8,20,130)
1150 CALL CHAR(131,"000000000003FC00")
1160 CALL HCHAR(8,19,131)
1170 CALL CHAR(132,"000000000000FF00")
1180 CALL HCHAR(8,18,132)
1190 CALL CHAR(133,"0000000000000F10")
1200 CALL HCHAR(8,17,133)
1210 CALL CHAR(134,"1020202010102040")
1220 CALL HCHAR(9,17,134)
1230 CALL CHAR(135,"408000000000FF00")
1240 CALL HCHAR(10,17,135)
1250 CALL CHAR(136,"000001020C34C7")
1260 CALL HCHAR(10,16,136)
1270 CALL HCHAR(10,18,132,3)
1280 CALL CHAR(137,"000000000000F008")
1290 CALL HCHAR(10,21,137)
1300 CALL CHAR(138,"08040201")
1310 CALL HCHAR(11,21,138)
1320 CALL CHAR(139,"0000000080704E81")
1330 CALL HCHAR(11,22,139)
1340 CALL CHAR(140,"0102020404040201")
1350 CALL HCHAR(12,21,140)
1360 CALL CHAR(141,"0000000000010201")
1370 CALL HCHAR(12,22,141)
1380 CALL CHAR(142,"808040404080")
1390 CALL HCHAR(13,22,142)
1400 CALL CHAR(143,"8040404040808080")
1410 CALL HCHAR(13,23,143)
1420 CALL CHAR(144,"010202040408C848")
1430 CALL HCHAR(14,22,144)
1440 CALL CHAR(145,"0000000000010238")
1450 CALL HCHAR(13,21,145)
1460 CALL CHAR(146,"44C848444A4A4948")
1470 CALL HCHAR(14,21,146)
1480 CALL CHAR(147,"3808000080404040")
1490 CALL HCHAR(15,22,147)
1500 CALL CHAR(148,"424221212020203F")
1510 CALL HCHAR(15,21,148)
1520 CALL CHAR(149,"00FF000018242424")
1530 CALL HCHAR(14,20,149)
1540 CALL CHAR(150,"0000000000000001")
1550 CALL HCHAR(10,15,150)
1560 CALL CHAR(151,"0202020202020202")
1570 CALL VCHAR(11,15,151,3)
1580 CALL CHAR(152,"121320204080")
1590 CALL HCHAR(14,15,152)
1600 CALL CHAR(153,"00FF")
1610 CALL HCHAR(14,16,153)
1620 CALL CHAR(154,"00FF8080838CB0C0")
1630 CALL HCHAR(14,17,154)
1640 CALL CHAR(155,"00FF0018E402314F")
1650 CALL HCHAR(14,18,155)
1660 CALL CHAR(156,"00FF00000000C020")
1670 CALL HCHAR(14,19,156)
1680 CALL CHAR(157,"2020180402020204")
1690 CALL HCHAR(15,19,157)
1700 CALL CHAR(158,"040807")
1710 CALL HCHAR(16,19,158)
1720 CALL CHAR(159,"1414121212121212")
1730 CALL HCHAR(15,20,159)
1740 CALL CHAR(33,"1414937080403804")
1750 CALL HCHAR(16,20,33)
1760 CALL CHAR(34,"0000C02117091212")
1770 CALL HCHAR(16,21,34)
1780 CALL CHAR(35,"40408")
1790 CALL HCHAR(16,22,35)
1800 CALL CHAR(36,"02120A0602040402")
1810 CALL HCHAR(17,20,36)
1820 CALL CHAR(37,"121224242428281")
1830 CALL HCHAR(17,21,37)
1840 CALL CHAR(38,"02010000000000FF")
1850 CALL HCHAR(18,20,38)
1860 CALL CHAR(39,"00008040201010E")
1870 CALL HCHAR(18,21,39)
1880 CALL CHAR(40,"00000000000000FF")
1890 CALL HCHAR(18,16,40,4)
1900 CALL CHAR(41,"F0000000000000FF")
1910 CALL HCHAR(18,15,41)
1920 CALL CHAR(42,"800F0000000000FF")
1930 CALL HCHAR(18,14,42)
1940 CALL CHAR(43,"01060830408000FF")
1950 CALL HCHAR(18,13,43)
1960 CALL CHAR(44,"000000000003040F")
1970 CALL HCHAR(18,12,44)
1980 CALL CHAR(45,"00000000000040A")
1990 CALL HCHAR(17,14,45)
2000 CALL CHAR(46,"0000000000030408")
2010 CALL HCHAR(17,15,46)
2020 CALL CHAR(47,"102020404080")
2030 CALL HCHAR(17,16,47)
2040 CALL CHAR(58,"0002050408081010")
2050 CALL HCHAR(16,16,58)
2060 CALL CHAR(59,"1020C")
2070 CALL HCHAR(16,17,59)
2080 CALL CHAR(60,"0000000001020C10")
2090 CALL HCHAR(15,17,60)
2100 CALL CHAR(61,"42404080")
2110 CALL HCHAR(15,18,61)
2120 CALL CHAR(62,"0808040402020101")
2130 CALL HCHAR(17,13,62)
2140 CALL CHAR(63,"0102020408101008")
2150 CALL HCHAR(16,13,63)
2160 CALL CHAR(64,"0408081020408080")
2170 CALL HCHAR(15,14,64)
2180 CALL CHAR(81,"0000000000010608")
2190 CALL HCHAR(14,14,81)
2200 CALL CHAR(90,"02060A0A0A0A0A12")
2210 CALL HCHAR(13,15,90)
2220 RANDOMIZE
2230 D=4
2240 DIM A(13),PL(4,13),CC$(13)
2250 FOR STATE=1 TO 13
2260 FOR ITEM=1 TO 4
2270 READ PL(ITEM,STATE)
2280 NEXT ITEM
2290 READ CC$ (STATE)
2300 NEXT STATE
2310 FOR N=1 TO 13
2320 R=INT(RND*13+1)
2330 IF A(R)=1 THEN 2320
2340 A(R)=1
2350 ROW=PL(1,R)
2360 COL=PL(2,R)
2370 J=PL(3,R)
2380 JJ=PL(4,R)
2390 CALL CHAR(88,CC$(R))
2400 CALL GCHAR(ROW,COL,G)
2410 CALL HCHAR(ROW,COL,88)
2420 FOR DELAY=1 TO 10
2430 NEXT DELAY
2440 CALL HCHAR(ROW,COL,G)
2450 CALL KEY(0,K,S)
2460 FOR DELAY=1 TO 5
2470 NEXT DELAY
2480 IF (K>48)*(K<52)THEN 2500
2490 GOTO 2410
2500 CALL SOUND(100,300,3)
2510 CALL HCHAR(22,25,K)
2520 CALL HCHAR(ROW,COL,88)
2530 FOR DELAY=1 TO 10
2540 NEXT DELAY
2550 CALL HCHAR(ROW,COL,G)
2560 CALL KEY(0,KK,S)
2570 FOR DELAY=1 TO 10
2580 NEXT DELAY
2590 IF ((KK>47)*(KK<58))THEN 2610
2600 GOTO 2520
2610 CALL HCHAR(22,26,KK)
2620 IF (K=J)*(KK=JJ)THEN 2660
2630 CALL SOUND(300,-3,2)
2640 CALL HCHAR(22,25,32,2)
2650 GOTO 2410
2660 CALL SOUND(100,300,3)
2670 FOR FLASH=1 TO 10
2680 CALL SCREEN(12+D)
2690 FOR DELAY=1 TO 20
2700 NEXT DELAY
2710 D=-D
2720 NEXT FLASH
2730 CALL HCHAR(22,25,32,2)
2740 NEXT N
2750 END
2760 DATA 8,25,49,49,FFFFFFFFFFFFFFFF
2770 DATA 9,25,49,50,0103FFFFFFFFFFFF
2780 DATA 16,15,49,51,FFFFFFFFFFFFFFFF
2790 DATA 10,25,49,52,0000FC3E3F3F3F3F
2800 DATA 12,19,49,53,FFFFFFFFFFFFFFFF
2810 DATA 13,22,49,54,FF7F3F3F7FFFFFFF
2820 DATA 9,21,49,57,FFFFFFFFFFFFFFFF
2830 DATA 15,21,50,48,7E7E3F3F3F3F3F3F
2840 DATA 17,18,50,49,FFFFFFFFFFFFFFF
2850 DATA 6,24,50,51,FFFFFFFFFFFFFFFE
2860 DATA 5,27,50,53,FFFFFFFFFFFFFFFF
2870 DATA 15,20,50,57,FFFFFFFFFFFFFFFF
2880 DATA 10,24,51,48,0000FFFFFFFFFFFF


#31 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 3:32 PM

 

Edited version corrects a number of typo-graphical errors.  Seems to work now.

 

Thanks for putting these up here Oddeman

 

Program 1.Northeastern States

100 REM NORTHEASTERN STATES

 

Thx for the debugging ;)



#32 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 4:14 PM

Find the Word
Skill area: Language Aits
Level 2,3
 
"Find the Word" can be played by any number of players at the same time.
 
When the program is run, a list of eight partially random let ters is displayed on the screen. The list is not quite random in that the letters Q, V, and Z never appear, and E, A, I, and O have a greater chance of being selected than the rest of the alphabet. The object is to find as many three-letter words as possible which can be made from the eight letters.
 
You should have a pen and paper available. After a minute or so, the words READY, HIT ANY KEY are printed. When a key is pressed, the computer will display a list ofthree-letter words that it located by searching a list of 368 words in its memory.
 
This program is particularly good in promoting language development and reading skills.
 
Find the Word
 
100 REM FIND THE WORD
110 REM
120 CALL CLEAR
130 PRINT "        FIND A WORD"
140 FOR J=1 TO 10
150 PRINT
160 NEXT J
170 PRINT "     PLEASE WAIT A MOMENT"
180 GOTO 670
190 DATA 1,31,32,58,59,77
200 DATA 78,95,96,108,109,130
210 DATA 131,147,148,168,169,174
220 DATA 175,185,186,189,190,206
230 DATA 207,218
240 F1=219
250 F2=230
260 RETURN
270 F1=231
280 F2=244
290 RETURN
300 F1=245
310 F2=273
320 RETURN
330 F1=274
340 F2=295
350 RETURN
360 F1=296
370 F2=324
380 RETURN
390 F1=325
400 F2=347
410 RETURN
420 F1=348
430 F2=348
440 RETURN
450 F1=349
460 F2=363
470 RETURN
480 F1=364
490 F2=368
500 RETURN
510 DATA ACE,ACT,ADD,ADO,AFT,AGE,AGO,AID,AIL,AIM,AIR,ALE,ALL,AND,ANY,APE,APT,ARC,ARE,ARK,ARM,ART,ASH,ASK,ASP,ASS
520 DATA ATE,ANT,AWE,AWL,AXE,BAD,BAG,BAN,BAR,BAT,BAY,BED,BEE,BEG,BET,BIG,BIN,BID,BIT,BOA,BOG,BOO,BOW,BOX,BOY,BUT
530 DATA BUM,BUN,BUY,BYE,BUG,BUD,CAB,CAD,CAM,CAN,CAP,CAR,CAT,COB,COD,COG,COT,COW,COY,CRY,CUB,CUD,CUE,CUP,CUT,DAB
540 DATA DAD,DAM,DEN,DEW,DIE,DIG,DIM,DIN,DIP,DOE,DOG,DOT,DRY,DUB,DUD,DUE,DUG,EAR,EAT,EBB,EEL,EGG
550 DATA EKE,ELK,ELM,END,ERA,ERR,EWE,EYE,FAD,FAG,FAN,FAR,FAT,FED,FEE,FEW,FIB,FIG,FIN,FIR,FIT,FIX,FLY,FOE,FOG,FOR
560 DATA FOX,FRY,FUN,FUR,GAB,GAG,GAP,GAY,GEL,GEM,GET,GIG,GIN,GOB,GOD,GOO,GOT,GUM,GUN,GUT,GUY,HAD,HAG,HAM,HAS,HAT
570 DATA HAY,HEN,HER,HEX,HEW,HID,HIM,HIP,HIS,HIT,HOD,HOE,HOG,HOP,HOT,HOW,ICE,ILK,ILL,INK,IMP,IRE,JAB,JAM,JAR,JAW
580 DATA JET,JIB,JIG,JOB,JOG,JOT,JOY,KEY,KID,KIN,KIT,LAB,LAD,LAP,LAW,LAX,LED,LEG,LET
590 DATA LID,LIE,LIP,LIT,LOB,LOG,LOP,LOW,LOT,MAD,MAN,MAP,MAR,MAT,MAY,MEN,MET,MIX,MOB,MUD,MUG,NAB,NAG,NAP,NET,NEW
600 DATA NIP,NOD,NOG,NOT,NOW,NUN,NUT,OAF,OAR,OAK,OAT,ODE,OFF,OIL,OLD,ONE,ORB,ORE,OUR,OUT,OWE,PAD,PAL,PAN,PAR,PAT
610 DATA PAW,PAY,PEA,PEG,PEN,PEP,PER,PET,PEW,PIE,PIG,PIN,PIT,PLY,POD,POP,POT,POX,PRY
620 DATA PUB,PUG,PUN,PUP,PUT,RAG,RAN,RAP,RAT,RAW,RAY,RED,RIB,RIG,RIM,RIP,ROB,ROE,ROT,ROW,RUE,RUB,RUG,RUM,RUN,RUT
630 DATA RYE,SAD,SAG,SAP,SAT,SAW,SEE,SEA,SET,SEW,SEX,SHE,SHY,SIN,SIP,SIR,SIT,SIX,SKY,SLY,SOB,SOD,SON,SOW,SOY,SPY
640 DATA STY,SUE,SUM,SUN,TAB,TAG,TAM,TAN,TAP,TAR,TAX,TEA,TEE,TEN,THE,TIE,TIN,TIP,TOE
650 DATA TON,TOO,TOP,TOW,TOY,TUB,TUG,TWO,URN,WAD,WAG,WAR,WAS,WAX,WAY,WED,WEE,WET,WHY,WIG,WIN,WIT,WOE,WON,YAM,YAP
660 DATA YES,YET,YOU
670 DIM A$(368),B$(50),R(8),L$(8),LL$(8),FF1(13),FF2(13)
680 FOR J=1 TO 13
690 READ FF1(J),FF2(J)
700 NEXT J
710 FOR J=1 TO 368
720 READ A$(J)
730 NEXT J
740 RANDOMIZE
750 CALL CLEAR
760 FOR J=1 TO 8
770 R(J)=INT(RND*30+1)
780 IF R(J)=17 THEN 1360
790 IF R(J)=22 THEN 1380
800 IF R(J)=26 THEN 1400
810 IF R(J)=27 THEN 1420
820 IF R(J)=28 THEN 1360
830 IF R(J)=29 THEN 1380
840 IF R(J)=30 THEN 1380
850 L$(J)=CHR$(R(J)+64)
860 PRINT " ";L$(J);
870 NEXT J
880 PRINT ::
890 N=0
900 FOR J=1 TO 8
910 IF J=1 THEN 960
920 T=1
930 IF L$(T)=L$(J)THEN 1180
940 T=T+1
950 IF T<J THEN 930
960 IF R(J)=24 THEN 1180
970 IF R(J)>13 THEN 1010
980 F1=FF1(R(J))
990 F2=FF2(R(J))
1000 GOTO 1020
1010 ON R(J)-13 GOSUB 240,270,300,210,330,360,390,420,210,450,210,480
1020 FOR W=F1 TO F2
1030 FOR I=1 TO 8
1040 LL$(I)=L$(I)
1050 NEXT I
1060 LL$(J)="Q"
1070 X$=SEG$(A$(W),2,1)
1080 FOR I=1 TO 8
1090 IF X$=LL$(I)THEN 1120
1100 NEXT I
1110 GOTO 1170
1120 LL$(I)="Z"
1130 X$=SEG$(A$(W),3,1)
1140 FOR I=1 TO 8
1150 IF X$=LL$(I)THEN 1330
1160 NEXT I
1170 NEXT W
1180 NEXT J
1190 PRINT "READY, HIT ANY KEY"
1200 CALL KEY(0,Q,S)
1210 IF S=0 THEN 1200
1220 PRINT N
1230 FOR I=1 TO N
1240 PRINT B$(I), O
1250 NEXT I
1260 PRINT
1270 PRINT "DO YOU WANT TO PLAY AGAIN?     (Y OR N)"
1280 CALL KEY(0,Q,S)
1290 IF Q=89 THEN 750
1300 IF Q=78 THEN 1320
1310 GOTO 1280
1320 END
1330 N=N+1
1340 B$(N)=A$(W)
1350 GOTO 1170
1360 R(J)=1
1370 GOTO 850
1380 R(J)=5
1390 GOTO 850
1400 R(J)=9
1410 GOTO 850
1420 R(J)=15
1430 GOTO 850

Should be OK!


Edited by oddemann, Mon Feb 26, 2018 4:14 PM.


#33 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 4:16 PM

450 STAKE(PLAYER)=STAKE(PLAYER)-3

should be

450 STAKE(PLAYER)=STAKE(PLAYER)-B

...lee

 

Thx, the fix is in the original post now!



#34 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 4:38 PM

Now on to Level 3 games... Whoooo :D
 

Chase
Skill area: Coordination
LeveL3
 
The goal of "Chase" is to teach spatial relations and map-reading skills. It is a variation of the classic maze game with an interest ing twist. You manipulate an arrow through a maze with three of the arrow keys (E for straight ahead, S for a left turn, and D for a right turn).
 
The objective is to catch a target which is always moving. The target leaves a trail behind it, and you must follow the trail exactly. If the target gets too far ahead, you lose, and if you catch the target, you win. The arrow moves twice as fast as the target, so ordinarily, the game would be pretty simple.The twist is that you must use the orientation of the arrow to determine which key to press. In ordinary maze games, you hit the left or right arrow if you want to move the character to the left or right side of the screen. You hit the up or down arrow if you want to move to the top or bottom of the screen. That is not necessarily true in this game. If the arrow is pointing left, meaning the screen character is moving left, and you want the character to move toward the top of the screen, you must hit the D key for a right turn. An object moving left has to make a right turn to move upward, just as a car driving west has to make a right turn to head north.
 
Likewise, if the arrow is moving down, and you wish to move the character toward the left, you must hit the right arrow, just as a car heading south has to turn right in order to head west. To move the arrow in the direction that it is currently pointing, it is necessary to hit the up-arrow key.
 
The ALPHA LOCK key should be down for this program to run if you are using the arrow keys.
 
This game is well suited for joysticks. In order to play with the joysticks instead of the arrow keys, it is necessary to change only four lines of the program.
 
670 CALL JOYST(1,X,Y)
680 IF (X=-4)THEM 980
690 IF (Y=4)THEN 1000
700 IF (X=4)THEN 1020
 
As with any program using joysticks, the ALPHA LOCK key must be up when the program is running.
 
Chase
100 REM CHASE
110 REM
120 DIM R(2),C(2)
130 CALL CHAR(96,"FFFFFFFFFFFFFFFF")
140 CALL CHAR(104,"102040FE40201000")
150 CALL CHAR(105,"1038549210101010")
160 CALL CHAR(106,"100804FE04081000")
170 CALL CHAR(107,"1010109254381000")
180 CALL CHAR(112,"007C4444447C0000")
190 CALL CHAR(113,"0000383838000000")
200 CALL CLEAR
210 SCORE=-1
220 RESTORE
230 INPUT "DEGREE OF DIFFICULTY(1,2,   OR 3)?":H
240 IF (H=1)+(H=2)+(H=3)THEN 270
250 PRINT :::"TRY AGAIN":::
260 GOTO 230
270 CALL CLEAR
280 CALL SCREEN(16)
290 FOR N=5 TO 27 STEP 2
300 FOR NN=3 TO 21 STEP 2
310 CALL VCHAR(NN,N,96)
320 NEXT NN
330 NEXT N
340 CALL HCHAR(1,3,96,27)
350 CALL HCHAR(23,3,96,27)
360 CALL VCHAR(1,3,96,23)
370 CALL VCHAR(1,29,96,23)
380 CALL COLOR(10,5,1)
390 CALL COLOR(11,9,1)
400 R(1)=6
410 C(1)=16
420 R(2)=8+4*H
430 C(2)=16
440 FOR J=R(1)TO R(2)
450 CALL HCHAR(J,16,113)
460 SCORE=SCORE+1
470 NEXT J
480 CALL HCHAR(R(2),16,105)
490 CALL HCHAR(R(1),16,112)
500 DIR=2
510 N=1
520 READ D
530 IF D=5 THEN 1270
540 OLDR=R(N)
550 OLDC=C(N)
560 ON D GOSUB 900,920,940,960
570 CALL SOUND(50,300,3)
580 CALL HCHAR(OLDR,OLDC,113)
590 CALL HCHAR(R(N),C(N),112)
600 SCORE=SCORE+1
610 IF SCORE>25 THEN 1120
620 FOR DELAY=1 TO 76-25*H
630 NEXT DELAY
640 N=2
650 OLDR=R(N)
660 OLDC=C(N)
670 CALL KEY(0,K,S)
680 IF (K=83)+(K=115)THEN 980
690 IF (K=69)+(K=101)THEN 1000
700 IF (K=68)+(K=100)THEN 1020
710 GOTO 510
720 D=D+DIR
730 IF D=0 THEN 1040
740 IF D=5 THEN 1060
750 ON D GOSUB 900,920,940,960
760 CALL GCHAR(R(N),C(N),G)
770 IF G<>113 THEN 870
780 CALL HCHAR(OLDR,OLDC,32)
790 CALL HCHAR(R(N),C(N),32)
800 ON D GOSUB 900,920,940,960
810 CALL SOUND(50,300,3)
820 CALL HCHAR(R(N),C(N),103+D)
830 SCORE=SCORE-2
840 IF SCORE<1 THEN 1080
850 DIR=D
860 GOTO 510
870 R(N)=OLDR
880 C(N)=OLDC
890 GOTO 510
900 C(N)=C(N)-1
910 RETURN
920 R(N)=R(N)-1
930 RETURN
940 C(N)=C(N)+1
950 RETURN
960 R(N)=R(N)+1
970 RETURN
980 D=-1
990 GOTO 720
1000 D=0
1010 GOTO 720
1020 D=1
1030 GOTO 720
1040 D=4
1050 GOTO 750
1060 D=1
1070 GOTO 750
1080 M$="YOU WIN"
1090 CALL SOUND(600,300,3)
1100 GOSUB 1290
1110 GOTO 1150
1120 CALL SOUND(600,-3, 3)
1130 M$="YOU LOST"
1140 GOSUB 1290
1150 M$="AGAIN (Y OR N)?"
1160 GOSUB 1290
1170 CALL KEY(0,K,S)
1180 IF (K=89)+(K=121)THEN 200
1190 IF (K=78)+(K=110)THEN 1210
1200 GOTO 1170
1210 END
1220 DATA 1,1,4,4,1,1,2,2,2,2,3,3,3,3,3,3,4,4,3,3,4,4,3,3,4,4,4,4,1,1,2,2,1,1,4,4
1230 DATA 4,4,4,4,3,3,4,4,1,1,1,1,1,1,4,4,1,1,2,2,2,2,3,3,2,2,2,2,1,1,2,2,2,2
1240 DATA 1,1,4,4,1,1,2,2,2,2,2,2,3,3,2,2,1,1,1,1,1,1,4,4,3,3,4,4,1,1,4,4,4,4
1250 DATA 3,3,4,4,3,3,3,3,4,4,3,3,3,3,3,3,2,2,3,3,3,3,4,4,3,3,4,4,3,3,2,2,3,3,4,4
1260 DATA 3,3,2,2,2,2,1,1,2,2,3,3,2,2,1,1,1,1,4,4,1,1,1,1,1,1,2,2,1,1,2,2,5
1270 RESTORE
1280 GOTO 520
1290 FOR K=1 TO LEN(M$)
1300 C$=SEG$(M$,K,1)
1310 CALL HCHAR(24,7+K,ASC(C$))
1320 NEXT K
1330 FOR DELAY=1 TO 300
1340 NEXT DELAY
1350 RETURN

Looks like I got all the bugs!



#35 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 5:02 PM

Percent Problems
Skill area: Mathematics
LeveL 3
 
"Percent Problems" consistsof45word problems which willreview and test your ability to solve problems involving percent. It is not intended to teach the concept of percent to someone who 
 
has no understanding of it.
 
The problems are divided into three types. Type 1 involves finding the percent of a number (X percent of Yis what?); type 2 involves finding what percent one number is of another (Xis what 
 
percent of Y?); and type 3 involves finding the whole when the percent is known (Xis Ypercent of what?).
 
Each problem is displayed on the screen, and you must enter the answer. It would be helpful if you had a pencil and paper or a calculatoravailable for computation, although none of the prob 
 
lemsinvolves complex arithmetic. You enter your answer. If the answer is correct, the program responds with THAT'SCORRECT (name), and then goes on to the next problem. If you are wrong,
the program responds WRONG!TRY AGAIN, and you are given another chance. If you cannot give the correct answer after the third try, the program displays instructions on how to solve that 
 
type of problem, and then solves the problem correctly.
 
Percent Problems
 
100 REM PERCENT PROBLEMS
110 REM
120 CALL CLEAR
130 PRINT TAB(3);"SOLVING PERCENT PROBLEMS"::
140 INPUT "WHAT IS YOUR NAME ":NAME$
150 FOR N=1 TO 5
160 READ P,X
170 ERROR=0
180 PRINT :::"IF THE SALES TAX RATE IS";P:"PERCENT, WHAT WOULD THE     SALES TAX BE ON A PURCHASE OF $";X;"?"
190 INPUT "$":GUESS
200 IF GUESS=X*P/100 THEN 270
210 ERROR=ERROR+1
220 IF ERROR>2 THEN 250
230 PRINT ::"WRONG! TRY AGAIN."
240 GOTO 190Odd
250 GOSUB 1350
260 GOTO 280
270 PRINT "THAT'S CORRECT ";NAME$:::
280 READ X,Y
290 ERROR=0
300 PRINT :::"THE TOTAL ENROLLMENT AT A   SCHOOL IS";X; " . TODAY THERE":"WERE";Y;"STUDENTS ABSENT."
310 PRINT "WHAT PERCENTAGE OF THE STU- DENTS WERE ABSENT?"
320 INPUT GUESS
330 IF GUESS=(Y/X)*100 THEN 400
340 ERROR=ERROR+1
350 IF ERROR>2 THEN 380
360 PRINT ::"WRONG! TRY AGAIN."
370 GOTO 320
380 GOSUB 1440
390 GOTO 410
400 PRINT "THAT'S CORRECT ";NAME$:::
410 READ X,P
420 ERROR=0
430 PRINT :::"A FAMILY BOUGHT A HOUSE.    THEY MADE A";P;"PERCENT DOWN":"PAYMENT. IF THE DOWN PAYMENT"
440 PRINT "WAS $";X;", HOW MUCH DID":"THE HOUSE COST?"::
450 INPUT " $":GUESS
460 IF GUESS=(X/P)*100 THEN 530
470 ERROR=ERROR+1
480 IF ERROR>2 THEN 510
490 PRINT :"WRONG! TRY AGAIN."
500 GOTO 450
510 GOSUB 1550
520 GOTO 540
530 PRINT "THAT'S CORRECT ";NAME$:::
540 READ P,X
550 ERROR=0
560 PRINT :::"A SALESMAN IS PAID ON COM- MISSION. HE RECEIVES";P:"PERCENT OF HIS TOTAL SALES."
570 PRINT "LAST MONTH HE SOLD $";X;"WORTH OF EQUIPMENT. WHAT WASHIS COMMISSION?"
580 INPUT " $":GUESS
590 IF GUESS=P*X/100 THEN 660
600 ERROR=ERROR+1
610 IF ERROR>2 THEN 640
620 PRINT :"WRONG! TRY AGAIN."
630 GOTO 580
640 GOSUB 1350
650 GOTO 670
660 PRINT :"THAT'S CORRECT ";NAME$::
670 READ X,Y
680 ERROR=0
690 PRINT :::"A BANK ACCOUNT HAD $";X:"IN IT AT THE BEGINNING OF   THE YEAR. IT EARNED $";Y:
700 PRINT "IN INTEREST. WHAT WAS THE INTEREST RATE IN PERCENT?"
710 INPUT GUESS
720 IF GUESS=(Y/X)*100 THEN 790
730 ERROR=ERROR+1
740 IF ERROR>2 THEN 770
750 PRINT :"WRONG! TRY AGAIN."::
760 GOTO 710
770 GOSUB 1440
780 GOTO 800
790 PRINT :"THAT'S CORRECT ";NAME$::
800 READ P,X
810 PRINT :::"A TENNIS TEAM WON";P;"PER-":"CENT OF ITS GAMES THIS YEAR."
820 ERROR=0
830 PRINT "IF THE TEAM WON" ;X; "GAMES, ": "HOW MANY GAMES DID IT PLAY?"::
840 INPUT GUESS
850 IF GUESS=(X/P)*100 THEN 920
860 ERROR=ERROR+1
870 IF ERROR>2 THEN 900
880 PRINT :"WRONG! TRY AGAIN.":
890 GOTO 840
900 GOSUB 1550
910 GOTO 930
920 PRINT :"THAT'S CORRECT ";NAMES::
930 READ P,X
940 ERROR=0
950 PRINT :::"A STUDENT GETS";P;"PERCENT":"OF THE PROBLEMS CORRECT ON A TEST. IF THERE ARE";X:
960 PRINT "PROBLEMS ON THE TEST, HOW   MANY DID THE STUDENT GET    CORRECT?":
970 INPUT GUESS
980 IF GUESS=(P*X)/100 THEN 1050
990 ERROR=ERROR+1
1000 IF ERROR>2 THEN 1030
1010 PRINT :"WRONG! TRY AGAIN."
1020 GOTO 970
1030 GOSUB 1350
1040 GOTO 1060
1050 PRINT :"THAT'S CORRECT ";NAME$::
1060 READ X,Y
1070 ERROR=0
1080 PRINT :::"THE REGULAR PRICE OF AN ITEMIS $";X;"BUT THE STORE TOOK"
1090 PRINT "$";Y;"OFF. WHAT PERCENT OFF WAS";"THIS?"
1100 INPUT GUESS
1110 IF GUESS=(Y/X)*100 THEN 1180
1120 ERROR=ERROR+1
1130 IF ERROR>2 THEN 1160
1140 PRINT :"WRONG! TRY AGAIN."
1150 GOTO 1100
1160 GOSUB 1440
1170 GOTO 1190
1180 PRINT :"THAT'S CORRECT ";NAME$::
1190 READ P,X
1200 ERROR=0
1210 PRINT :::"A SALESMAN IS PAID ON COM- MISSION. HE IS PAID";P:"PERCENT OF HIS SALES. LAST"
1220 PRINT "MONTH HIS COMMISSIONS WERE $";X;". WHAT WAS THE VALUE"
1230 PRINT "OF HIS SALES?"
1240 INPUT " $":GUESS
1250 IF GUESS=(X/P)*100 THEN 1320
1260 ERROR=ERROR+1
1270 IF ERROR>2 THEN 1300
1280 PRINT -."WRONG! TRY AGAIN."
1290 GOTO 1240
1300 GOSUB 1550
1310 GOTO 1330
1320 PRINT :"THAT'S CORRECT ";NAME$::
1330 NEXT N
1340 END
1350 PRINT ::"THIS IS AN EXAMPLE OF A     PROBLEM WHICH INVOLVES      FINDING A PERCENT OF A"
1360 PRINT "NUMBER. TO FIND THE PERCENT OF A NUMBER, DIVIDE THE     PERCENT BY 100 TO GET A"
1370 PRINT "DECIMAL. THEN MULTIPLY     THIS DECIMAL TIMES THE NUM- BER. TO SOLVE THIS PROBLEM"
1380 PRINT "DIVIDE";P;"BY 100 TO GET";P/100;"THEN MULTIPLY";P/100;"TIMES"
1390 PRINT X;"TO GET";X*P/100:::
1400 PRINT "HIT ANY KEY TO CONTINUE."
1410 CALL KEY(0,K,S)
1420 IF S=0 THEN 1410
1430 RETURN
1440 PRINT :::"THIS IS AN EXAMPLE OF A     PROBLEM WHERE YOU NEED TO   FIND OUT WHAT PERCENT ONE"
1450 PRINT "NUMBER IS OF ANOTHER. TO   SOLVE THIS TYPE OF PROBLEM DIVIDE THE SMALLER NUMBER"
1460 PRINT "BY THE LARGER NUMBER TO GET A DECIMAL. MULTIPLY THIS    DECIMAL TIMES 100 TO GET THE"
1470 PRINT "PERCENT. TO SOLVE THIS{5 SPACES)PROBLEM, DIVIDE";Y;"BY"
1480 PRINT X;"TO GET THE DECIMAL";Y/X
1490 PRINT "THEN MULTIPLY THIS TIMES 100TO GET"/(Y/X)*100;". THE ANSWER IS"
1500 PRINT (Y/X)*100;"PERCENT.":::
1510 PRINT "HIT ANY KEY TO CONTINUE."
1520 CALL KEY(0,K,S)
1530 IF S=0 THEN 1520
1540 RETURN
1550 PRINT :::"THIS IS AN EXAMPLE OF A     PROBLEM WHERE YOU HAVE TO   FIND A NUMBER WHEN A PERCENT"
1560 PRINT "OF IT IS KNOWN. TO SOLVE    THIS TYPE OF PROBLEM, "
1570 PRINT "DIVIDE THE NUMBER GIVEN BY THE PERCENT, AND THEN MULTI-PLY THE RESULT BY 100. TO"
1580 PRINT "SOLVE THIS PROBLEM, DIVIDE";X;"BY";P;"TO GET";X/P;"."
1590 PRINT "THEN MULTIPLY THIS BY 100 TOGET";(X/P)*100;"THE ANSWER IS"
1600 PRINT (X/P)*100;".": :
1610 PRINT "HIT ANY KEY TO CONTINUE."
1620 CALL KEY(0,K,S)
1630 IF S=0 THEN 1620
1640 RETURN
1650 DATA 5,200,500,100,6000,20,10,12000,5000,500,50,10,80,20,200,50,10,1200
1660 DATA 4,50,400,20,12000,20,5,30000,8000,400,25,4,60,25,250,50,20,2000
1670 DATA 6,60,1000,80,7500,15,20,20000,12000,960,60,15,95,40,800,320,15,3000
1680 DATA 7,12,640,80,8400,12,15,15000,15000,1350,75,12,64,50,700,245,12,3000
1690 DATA 3,27,1100,66,9900,18,18,12000,21000,1470,90,27,88,50,840,126,7,1015

Most of the bugs are out, I think!

OK, question for the smart ones...

Many places in this program you have this:
PRINT -."WRONG! TRY AGAIN."
and
PRINT :"THAT'S CORRECT ";NAME$::

Many times!


My thinking is that "GOSUB" would be better to save space... BUT is it as fast or is it slower to have ONE place where you define and PRINT out Wrong or Correct with GOSUB?


#36 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 5:49 PM

Remember the Maze
Skill area: Memory
Level: 3
 
Spatial memory involves remembering the location of objects in relation to each other. How good is your spatial memory? Play "Remember the Maze" to find out.
 
Spatial memory can be improved with practice. When you first see the square in the center of the screen, pay close attention. Soon a row of stars will appear and zigzag around the screen ending at a dollar sign. The entire pattern remains on the screen for approximately ten seconds, and then the stars disappear, leaving only the square and the dollar sign.
 
The object of the game is to remember as much of the row of stars as possible while it is on the screen. Once the stars disappear, you move the square around the screen with the four arrow keys. The S key moves it to the left, the D key moves it to the right, the E key moves it up, and the X key moves it down. However, the square can only move along the path determined by the stars, and every time you try to move the square off the invisible path, there is a warning sound and the score is increased by one. The object is to reach die dollar sign after making as few errors as possible.
 
When the end of the path is reached, the screen flashes, and you're asked whether you want to play again. If the answer is yes, you can either play the same maze again or try a different maze.
 
The ALPHA LOCK key must be down (on) for this program to work properly.
 
 
Remember the Maze
100 REM REMEMBER THE MAZE
110 REM
120 DIM A(10)
130 RANDOMIZE
140 CALL CHAR(128,"007E7E7E7E7E7E00")
150 M=INT(RND*10+1)
160 IF A(M)=1 THEN 150
170 A(M)=1
180 N=N+1
190 R=12
200 C=14
210 SCORE=0
220 SC=0
230 CALL SCREEN(16)
240 CALL COLOR(13,9,1)
250 CALL COLOR(2,9,1)
260 CALL CLEAR
270 CALL HCHAR(R,C,128)
280 ON M GOSUB 860,1030,1200,1370,1520,1670,1840,2000,2170,2350
290 FOR I=1 TO 3000
300 NEXT I
310 CALL COLOR(2,1,1)
320 RR=R
330 CC=C
340 CALL KEY(0,K,S)
350 IF K=68 THEN 580
360 IF K=69 THEN 600
370 IF K=83 THEN 620
380 IF K=88 THEN 640
390 IF S=0 THEN 340
400 CALL SOUND(300,-3,5)
410 GOTO 340
420 CALL GCHAR(R,C,G)
430 IF G=42 THEN 560
440 IF G=36 THEN 660
450 R=RR
460 C=CC
470 CALL SOUND(300,300,3)
480 SCORE=SCORE+1
490 IF SCORE=10 THEN 520
500 CALL HCHAR(23,28,SCORE+48)
510 GOTO 340
520 SCORE=0
530 SC=SC+1
540 CALL HCHAR(23,27,SC+48)
550 GOTO 500
560 CALL HCHAR(R,C,128)
570 GOTO 320
580 C=C+1
590 GOTO 420
600 R=R-1
610 GOTO 420
620 C=C-1
630 GOTO 420
640 R=R+1
650 GOTO 420
660 CALL SOUND(1000,500,3)
670 D=4
680 FOR I=1 TO 9
690 CALL SCREEN(12+D)
700 FOR DELAY=1 TO 20
710 NEXT DELAY
720 D=-D
730 NEXT I
740 IF H>9 THEN 850
750 PRINT "AGAIN (Y OR N)?"
760 CALL KEY(0,K,S)
770 IF K=89 THEN 800
780 IF K=78 THEN 850
790 GOTO 760
800 PRINT "SAME MAZE OR DIFFERENT MAZE (S OR 0)?"
810 CALL KEY(0,K,S)
820 IF K=83 THEN 190
830 IF K=68 THEN 150
840 GOTO 810
850 END
860 REM MAZE ONE
870 CALL VCHAR(3,14,42,9)
880 CALL HCHAR(3,14,42,13)
890 CALL VCHAR(3,26,42,6)
900 CALL HCHAR(8,17,42,10)
910 CALL VCHAR(8,17,42,14)
920 CALL HCHAR(21,17,42,3)
930 CALL VCHAR(21,19,42,3)
940 CALL HCHAR(23,9,42,11)
950 CALL VCHAR(11,9,42,12)
960 CALL HCHAR(11,5,42,5)
970 CALL VCHAR(6,5,42,6)
980 CALL HCHAR(6,5,42,7)
990 CALL VCHAR(6,11,42,13)
1000 CALL HCHAR(18,11,42,3)
1010 CALL HCHAR(18,14,36)
1020 RETURN
1030 REM MAZE TWO
1040 CALL HCHAR(12,15,42,10)
1050 CALL VCHAR(12,24,42,4)
1060 CALL HCHAR(15,8,42,17)
1070 CALL VCHAR(8,8,42,8)
1080 CALL HCHAR(8,8,42,12)
1090 CALL HCHAR(7,19,42,6)
1100 CALL VCHAR(5,24,42,3)
1110 CALL HCHAR(5,17,42,8)
1120 CALL VCHAR(3,17,42,3)
1130 CALL HCHAR(3,3,42,15)
1140 CALL VCHAR(3,3,42,18)
1150 CALL HCHAR(20,3,42,5)
1160 CALL VCHAR(20,7,42,3)
1170 CALL HCHAR(22,7,42,7)
1180 CALL HCHAR(22,14,36)
1190 RETURN
1200 REM MAZE THREE
1210 CALL VCHAR(6,14,42,6)
1220 CALL HCHAR(6,11,42,4)
1230 CALL VCHAR(6,11,42,10)
1240 CALL HCHAR(15,9,42,3)
1250 CALL VCHAR(4,9,42,12)
1260 CALL HCHAR(4,5,42,5)
1270 CALL VCHAR(4,5,42,14)
1280 CALL HCHAR(17,5,42,17)
1290 CALL VCHAR(13,21,42,5)
1300 CALL HCHAR(13,21,42,5)
1310 CALL VCHAR(13,25,42,7)
1320 CALL HCHAR(19,19,42,7)
1330 CALL VCHAR(19,19,42,3)
1340 CALL HCHAR(21,15,42,5)
1350 CALL HCHAR(21,14,36)
1360 RETURN
1370 REM MAZE FOUR
1380 CALL HCHAR(12,12,42,2)
1390 CALL VCHAR(12,12,42,12)
1400 CALL HCHAR(23,6,42,7)
1410 CALL VCHAR(10,6,42,14)
1420 CALL VCHAR(5,7,42,6)
1430 CALL HCHAR(5,7,42,20)
1440 CALL VCHAR(5,26,42,5)
1450 CALL HCHAR(9,18,42,9)
1460 CALL VCHAR(9,18,42,4)
1470 CALL HCHAR(12,18,42,10)
1480 CALL VCHAR(12,27,42,11)
1490 CALL HCHAR(22,15,42,13)
1500 CALL HCHAR(22,14,36)
1510 RETURN
1520 REM MAZE FIVE
1530 CALL VCHAR(13,14,42,7)
1540 CALL HCHAR(19,14,42,15)
1550 CALL VCHAR(15,28,42,5)
1560 CALL HCHAR(15,22,42,7)
1570 CALL VCHAR(15,22,42,3)
1580 CALL HCHAR(17,20,42,3)
1590 CALL VCHAR(5,20,42,13)
1600 CALL HCHAR(5,5,42,16)
1610 CALL VCHAR(5,5,42,12)
1620 CALL HCHAR(17,5,42,5)
1630 CALL VCHAR(17,9,42,6)
1640 CALL HCHAR(22,9,42,5)
1650 CALL HCHAR(22,14,36)
1660 RETURN
1670 REM MAZE SIX
1680 CALL HCHAR(12,15,42,7)
1690 CALL VCHAR(8,21,42,5)
1700 CALL HCHAR(8,8,42,14)
1710 CALL VCHAR(8,8,42,11)
1720 CALL HCHAR(18,8,42,10)
1730 CALL VCHAR(18,17,42,4)
1740 CALL HCHAR(21,17,42,6)
1750 CALL VCHAR(17,23,42,5)
1760 CALL HCHAR(17,23,42,4)
1770 CALL VCHAR(5,26,42,13)
1780 CALL HCHAR(5,5,42,22)
1790 CALL VCHAR(5,5,42,10)
1800 CALL VCHAR(14,6,42,9)
1810 CALL HCHAR(22,6,42,8)
1820 CALL HCHAR(22,14,36)
1830 RETURN
1840 REM MAZE SEVEN
1850 CALL VCHAR(7,14,42,5)
1860 CALL HCHAR(7,14,42,4)
1870 CALL VCHAR(7,17,42,6)
1880 CALL HCHAR(12,17,42,4)
1890 CALL VCHAR(5,21,42,8)
1900 CALL HCHAR(5,10,42,12)
1910 CALL VCHAR(5,10,42,8)
1920 CALL HCHAR(12,8,42,3)
1930 CALL VCHAR(8,8,42,5)
1940 CALL HCHAR(8,4,42,5)
1950 CALL VCHAR(8,4,42,11)
1960 CALL HCHAR(18,4,42,11)
1970 CALL VCHAR(18,14,42,4)
1980 CALL HCHAR(22,14,36)
1990 RETURN
2000 REM MAZE EIGHT
2010 CALL HCHAR(12,12,42,2)
2020 CALL VCHAR(12,12,42,4)
2030 CALL HCHAR(15,8,42,5)
2040 CALL HCHAR(16,6,42,3)
2050 CALL VCHAR(6,6,42,11)
2060 CALL HCHAR(6,6,42,12)
2070 CALL VCHAR(6,17,42,3)
2080 CALL HCHAR(9,17,42,4)
2090 CALL VCHAR(9,20,42,5)
2100 CALL HCHAR(14,20,42,6)
2110 CALL VCHAR(14,25,42,5)
2120 CALL HCHAR(18,19,42,7)
2130 CALL VCHAR(18,19,42,4)
2140 CALL HCHAR(21,14,42,6)
2150 CALL HCHAR(22,14,36)
2160 RETURN
2170 REM MAZE NINE
2180 CALL VCHAR( 13,14,42,3)
2190 CALL HCHAR(15,8,42,7)
2200 CALL VCHAR(10,8,42,6)
2210 CALL HCHAR(10,8,42,13)
2220 CALL VCHAR(10,20,42,8)
2230 CALL HCHAR(17,20,42,6)
2240 CALL VCHAR(3,25,42,15)
2250 CALL HCHAR(3,12,42,13)
2260 CALL HCHAR(4,4,42,9)
2270 CALL VCHAR(4,4,42,17)
2280 CALL HCHAR(20,4,42,4)
2290 CALL VCHAR(18,8,42,3)
2300 CALL HCHAR(13,8,42,4)
2310 CALL VCHAR(18,11,42,5)
2320 CALL HCHAR(22,11,42,3)
2330 CALL HCHAR(22,14,36)
2340 RETURN
2350 REM MAZE 10
2360 CALL HCHAR(12,15,42,7)
2370 CALL VCHAR(12,21,42,4)
2380 CALL HCHAR(15,10,42,12)
2390 CALL VCHAR(9,10,42,6)
2400 CALL HCHAR(9,10,42,14)
2410 CALL VCHAR(9,23,42,10)
2420 CALL HCHAR(18,23,42,3)
2430 CALL VCHAR(18,25,42,3)
2440 CALL HCHAR(21,18,42,8)
2450 CALL HCHAR(22,15,42,4)
2460 CALL HCHAR(22,14,36)
2470 RETURN

Think I got all the bugs!



#37 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Mon Feb 26, 2018 5:53 PM

Scramble
Skill area: Language Arts
Level 3
 
In this two-player game, a scrambled word is shown on the screen, and the players race to unscramble it. For example, the computer might show the following letters:
 
ELTERT
 
These unscramble to make the word 'letter." Each of the two players is assigned a key; one has the Q key and one has the P key. After the scrambled letters are shown, whoever presses their key first gets to enter the correct word. You have about 16 seconds in which to do this. If the correct word is typed in and the ENTER key hit before time runs out, you get five points. There is a clock running at the top of the screen, and if the clock gets to 120 before you have entered the correct word, you lose five points. You also lose five points if the wrong word is entered. After the word is typed in, it is important to hit the ENTER key before the time is up.
 
The score for each player is shown on every round. There are 100 words in the program.
 
Computers can only do one thing at a time, and as a result, since the clock is running while you are entering the word, sometimes it is necessary to hold a key down for a moment before the letter appears on the screen. If you type in the wrong letter or hold a key down too long so that a letter appears twice by mistake, it is possible to erase one or more letters that have been typed in with the zero key.
 
The program contains only six-letter words. This list is of moderate difficulty for most adults and older children. For younger children, a list of five-letter words might be more appropriate. If you wish, you can substitute the following list for the list of words in the DATA statements in the program.
 
If one or more of the players are extremely slow typists, the 16-second time limit may not be long enough. It is possible to extend the limit by changing the 2 in the equation (WW=2) in line 770 to a higher number (up to 9).
 
If a scrambled word has been on the screen for 30 seconds and neither of the two players has hit their key, the program shows what the correct answer was and goes to the next word.
 
The ALPHA LOCK key must be down (on) for this program to work.
 
Five-Letter Words
CATCH PRICE SINCE RAPID
STORM OTHER OWNER HUMAN
PRESS FIRST LEAST TOWER
WOMAN GROUP WRITE ABOUT
BLACK SOUND HABIT DOZEN
WHITE WOULD ALONE STUDY
EARLY FUNNY CLOSE FIELD
WHICH PLACE TOUCH MAJOR
UNDER MONTH POINT SMOKE
QUICK STYLE SHAKE CHILD
HEAVY MIGHT GIANT EXTRA
COVER POWER SNEAK FLASH
STORE EIGHT WORRY TRUST
STORY PLANT LOVER CROSS
ATTIC FEVER SHINE BASIC
MUSIC TOUGH GROUP ENJOY
TRAIN CRACK WORLD AMUSE
ADULT VISIT CABIN SEVEN
LEARN WRONG THIRD ABOUT
HOUSE PRIME WHALE ENTER
DRINK HOTEL YOUNG ABUSE
FOUND BUILD COURT ORDER
LOCAL AVOID WATER APPLE
MATCH BEGIN PARTY ARGUE
FORCE HAPPY SWORD FENCE
 
 
Scramble
100 REM SCRAMBLE
110 REM
120 CALL CLEAR
130 DIM A$(100),B(100),NAME$(2),SCORE(2),C(12),ANS$(12)
140 INPUT "PLAYER ONE ":NAME$(1)
150 INPUT "PLAYER TWO ":NAME$(2)
160 PRINT ::NAME$(1);"'S KEY IS Q"::
170 PRINT NAME$(2);"'S KEY IS P"::
180 RANDOMIZE
190 FOR N=1 TO 100
200 READ A$(N)
210 NEXT N
220 FOR M=1 TO 100
230 CALL CLEAR
240 V=1
250 P=1
260 PRINT NAME$(1);"'S SCORE IS";SCORE(1):
270 PRINT NAME$(2);"'S SCORE IS";SCORE(2)::::::::::
280 R=INT(RND*100+1)
290 IF B(R)=1 THEN 280
300 B(R)=1
310 PRINT TAB(10);
320 L=LEN(A$(R))
330 FOR N=1 TO L
340 T=INT(RND*L+1)
350 IF C(T)=1 THEN 340
360 C(T)=1
370 PRINT SEG$(A$(R),T,1);
380 NEXT N
390 PRINT :::
400 CALL KEY(0,K,S)
410 IF K=81 THEN 700
420 IF K=80 THEN 720
430 P=P+1
440 IF P=500 THEN 950
450 GOTO 400
460 PRINT TAB(3);NAME$(J);"'S TURN":::
470 W=0
430 ww=0
490 WWV7=0
500 V7=W+1
510 IF W=10 THEN 750
520 CALL HCHAR(5,27,W+48)
530 CALL KEY(0,K,S)
540 IF K=13 THEN 580
550 IF (K>64)*(K<91)THEN 850
560 IF K=48 THEN 890
570 GOTO 500
580 FOR N=1 TO L
590 IF ANS$(N)<>SEG$(A$(R),N,1)THEN 940
600 NEXT N
610 SCORE(J)=SCORE(J)+5
620 FOR N=1 TO 12
630 C(N)=0
640 NEXT N
650 PRINT :::"HIT ANY KEY TO CONTINUE."::
660 CALL KEY(0,K,S)
670 IF S=0 THEN 660
680 NEXT M
690 END
700 J=1
710 GOTO 730
720 J=2
730 CALL SOUND(50,200,3)
740 GOTO 460
750 W=0
760 WW=WW+1
770 IF (WW=2)*(WWW=1)THEN 940
780 IF WW=10 THEN 810
790 CALL HCHAR(5,26,WW+48)
800 GOTO 520
810 WW=0
820 WVJW=1
830 CALL HCHAR(5,25,49)
840 GOTO 790
850 ANS$(V)=CHR$(K)
860 CALL HCHAR(23,11+V,K)
870 V=V+1
880 GOTO 500
890 V=V-1
900 IF V>0 THEN 920
910 V=1
920 CALL HCHAR(23,11+V,32)
930 GOTO 500
940 SCORE(J)=SCORE(J)-5
950 CALL SOUND(600,-3,3)
960 PRINT TAB(10);A$(R)
970 GOTO 620
980 DATA NATION,IGNORE,PENCIL,MONKEY,DIVIDE,CATTLE,ENTIRE,SINGLE,DECIDE,AFFAIR
990 DATA STRONG,MATTER,SENIOR,JUNIOR,HEAVEN,TRAVEL,PEOPLE,RESULT,AGENCY,WONDER
1000 DATA SECOND,LOCATE,FLIGHT,REASON,PLEASE,SECRET,PRINCE,INSIDE,ENERGY,FUTURE
1010 DATA ELEVEN,CARPET,CHOICE,BATTLE,THROAT,REALLY,PERIOD,EMPIRE,POLICE,INVENT
1020 DATA CLEVER,RATHER,ORIGIN,ISLAND,BEAUTY,INFORM,FLOWER,RECORD,MOMENT,ESCAPE
1030 DATA ALWAYS,DOUBLE,MODERN,REFUSE,EXPERT,HANDLE,NUMBER,ATTEND,TWENTY,RETURN
1040 DATA REPAIR,HEALTH,PARENT,FIGURE,SOCIAL,OFFICE,AROUND,FAMILY,AUTHOR,DOCTOR
1050 DATA CHANGE,CHARGE,BRIGHT,DAMAGE,WEIGHT,LAWYER,ACROSS,MOTHER,FATHER,CUSTOM
1060 DATA POLISH,EFFORT,SHRINK,TONGUE,SYMBOL,SYSTEM,BEHIND,CORNER,COFFEE,VIOLIN
1070 DATA CAMERA,REMOTE,FOLLOW,LITTLE,STRING,CANNOT,BECOME,REMOVE,DEVICE,SUFFIX

Think it is bug free!



#38 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Tue Feb 27, 2018 3:59 AM

Depth Charges
Skill area: Logic
Level: 3
 
As captain of an anti-submarine vessel, you know that some where beneath your ship is an enemy submarine. You have to destroy the submarine with depth charges. The problem is that you have only a limited number of depth charges remaining, so you must aim carefully.
 
The only information you have is that when you drop a depth charge, the ship's computer tells you how much you missed the submarine by.
 
"Depth Charges" has two levels of difficulty. With level 1, you are playing in two-dimensional space, and you set your coordinates with a letter from A to I and a digit from 1 to 9. Thus, there are 81 possible places where the submarine might be.
 
The grid on the screen will show you where you have fired. To fire a depth charge, first type in a letter, then a number. You will hear the sound of the depth charge exploding, and the computer will show you how far off you were. The amount that you missed by is determined by the coordinate that you were furthest away on. If you fired at C 7 and the submarine was at H 6, you would be told that you missed by 5. If you fired at C 7 and the submarine was at A 2, you would also be told that you missed by 5. The number that you missed by will be shown in the cell in the grid that you fired at. At this level of difficulty, you have a total of six depth charges. If you fail to hit the submarine with six depth charges, the computer will show you where the submarine is located and will ask if you wish to play again.
 
Level 2 is the same as level 1 except that the game is played in three dimensions. Unfortunately, it is impossible to show a three dimensional grid on a two-dimensional screen, so that grid is of limited use here. In level 2, you have to enter three coordinates for your depth charge: a letter between A and I and two numbers between 1 and 9.Thus there are 729 possible locations where the submarine might be. A record of each depth charge and its distance from the target is shown on the right side of the screen. In this case you have nine depth charges.
 
 

Depth Charges

100 REM DEPTH CHARGES
110 REM
120 CALL CLEAR
130 RANDOMIZE
140 DIM X(3),Y(3)
150 INPUT "DIFFICULTY LEVEL(1 OR 2)":L
160 IF (L=1)+(L=2)THEN 190
170 PRINT "TRY AGAIN."
180 GOTO 150
190 L=L+1
200 CALL CLEAR
210 CALL CHAR(97,"FF")
220 CALL CHAR(98,"8080808080808080")
230 CALL CHAR(99,"FF80808080808080")
240 PRINT TAB(24);"LEVEL"
250 PRINT TAB(25);L-1::::::::::::::
260 PRINT TAB(22);"DEPTH"
270 PRINT TAB(21);"CHARGES"
280 PRINT TAB(20);"REMAINING"
290 FOR M=1 TO 9
300 FOR N=1 TO 9
310 CALL HCHAR(2*M,3+2*N,99)
320 CALL HCHAR(1+2*M,3+2*N,98)
330 CALL HCHAR(2*M,4+2*N,97)
340 NEXT N
350 CALL HCHAR(1,4+2*M,64+M)
360 CALL HCHAR(1+2*M,4,48+M)
370 NEXT M
380 CALL HCHAR(20,5,97,18)
390 CALL VCHAR(2,23,98,18)
400 FOR N=1 TO L
410 X(N)=INT(RND*9+1)
420 NEXT N
430 DC=3*L
440 CALL HCHAR(24,26,48+DC)
450 M$="READY"
460 GOSUB 1280
470 CALL KEY(0,Y(1),S)
480 IF (Y(1)>64)*(Y(1)<74)THEN 500
490 GOTO 470
500 CALL SOUND(50,300,3)
510 CALL HCHAR(23,11,Y(1))
520 CALL KEY(0,Y(2),S)
530 IF (Y(2)>48)*(Y(2)<58)THEN 550
540 GOTO 520
550 CALL SOUND(50,300,3)
560 CALL HCHAR(23,13,Y(2))
570 FOR DELAY=1 TO 200
580 NEXT DELAY
590 IF L=2 THEN 650
600 CALL KEY(0,Y(3),S)
610 IF (Y(3)>48)*(Y(3)<58)THEN 630
620 GOTO 600 ^
630 CALL SOUND(50,300,3)
640 CALL HCHAR(23,15,Y(3))
650 FOR DELAY=1 TO 300
660 NEXT DELAY
670 CALL SOUND(700,-6,3)
680 D=0
690 Y(1)=Y(1)-16
700 FOR N=1 TO L
710 DD=ABS(X(N)-(Y(N)-48))
720 IF DD<D THEN 740
730 D=DD
740 NEXT N
750 IF D=0 THEN 930
760 M$="YOU MISSED BY"
770 GOSUB 1280
780 CALL HCHAR(23,19,D+48)
790 Y(1)=Y(1)+16
800 CALL HCHAR(1+2*(Y(2)-48),4+2*(Y(1)-64),D+48)
810 FOR N=1 TO L
820 CALL HCHAR(15-DC,24+N,Y(N))
830 NEXT N
840 CALL HCHAR(15-DC,29,D+48)
850 DC=DC-1
860 CALL HCHAR(24,26,48+DC)
870 IF DC=0 THEN 1030
880 FOR DELAY=1 TO 600
890 NEXT DELAY
900 CALL HCHAR(23,5,32,15)
910 CALL HCHAR(24,5,32,15)
920 GOTO 440
930 CALL HCHAR(23,5,32,15)
940 Y(1)=Y(1)+16
950 CALL HCHAR(1+2*(Y(2)-48),4+2*(Y(1)-64),42)
960 CALL HCHAR(23,5,72)
970 CALL HCHAR(23,6,73)
980 CALL HCHAR(23,7,84)
990 CALL SOUND(400,300,3)
1000 FOR DELAY=1 TO 500
1010 NEXT DELAY
1020 GOTO 1080
1030 CALL SOUND(500,-3,3)
1040 CALL HCHAR(17,25,64+X(1))
1050 CALL HCHAR(17,26,48+X(2))
1060 IF L=2 THEN 1080
1070 CALL HCHAR(17,27,48+X(3))
1080 CALL HCHAR(23,5,32,15)
1090 CALL HCHAR(24,5,32,15)
1100 M$="AGAIN (Y OR N)?"
1110 GOSUB 1280
1120 CALL KEY(0,K,S)
1130 IF K=89 THEN 1160
1140 IF K=78 THEN 1260
1150 GOTO 1120
1160 FOR M=3 TO 19 STEP 2
1170 FOR N=6 TO 22 STEP 2
1180 CALL HCHAR(M,N,32)
1190 NEXT N
1200 NEXT M
1210 FOR N=25 TO 29
1220 CALL VCHAR(6,N,32,14)
1230 NEXT N
1240 CALL HCHAR(23,5,32,15)
1250 GOTO 400
1260 CALL CLEAR
1270 END
1280 FOR P=1 TO LEN(M$)
1290 S$=SEG$(M$,P,1)
1300 CALL HCHAR(23,4+P,ASC(S$))
1310 NEXT P
1320 RETURN

Think I got all PDF bugs!
There is a "display" bug, there some of the text is on the screen, but that is for later. Or YOU find it? :D


Edited by oddemann, Tue Feb 27, 2018 4:00 AM.


#39 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Tue Feb 27, 2018 4:22 AM

Air Traffic Controller
Skill area: Memory
Level 3
 
You are the air traffic controller for a busy airport. As flights arrive, you must assign them to a holding pattern until a runway is free. Holding patterns are numbered 1 to 8. When a runway is free, you must specify both the flight and the holding pattern where the flight is waiting in order to land the plane. Rights should be landed in the order that they arrive, because airlines and passengers get upset if planes have to wait too long.
 
Your objective is to score as few demerits as possible. There are three ways in which you can score demerits:
 
 •Leaving flights in holding patterns longer than necessary.
 •Assigning an incoming flight to a holding pattern which already has another flight assigned to it, or
 •Forgetting which holding pattern a flight is in.
 
You designate flights by the name of the airline.There are eight air lines which serve your airport: AIKTRAVEL, AMER-ABR, SOUTH, AIREAST, TIAIR, PRONTO, CTR and NJAIR. However, at any particular time, one airline can have more than one flight waiting to land.
 
This game requires concentration and a good memory.Initially, all of the holding patterns are empty, and it is easy to keep track of which flights are assigned where. Over time, flights arrive faster than they can be landed, and they build up so that eventually you must keep track of four or five different flights at the same time. Then, as the day ends, no more flights arrive, and you simply have to land the flights that are waiting —if you can remember where you assigned them.
 
The ALPHA LOCK key must be down (on) for this program to run properly.
 
 
Air Traffic Controller
100 REM AIR TRAFFIC CONTROLLER
120 CALL CLEAR
130 PRINT " AIR TRAFFIC CONTROLLER":::
140 PRINT "YOU ARE THE AIR TRAFFIC     CONTROLLER FOR A BUSY AIR-  PORT. AS FLIGHTS ARRIVE,"
150 PRINT "YOU MUST ASSIGN THEM TO A   HOLDING PATTERN UNTIL A RUN-WAY IS FREE. HOLDING PAT- "
160 PRINT "TERNS ARE NUMBERED 1 TO 8.  WHEN A RUNWAY IS FREE, YOU MUST SPECIFY BOTH THE FLIGHT"
170 PRINT "AND THE HOLDING PATTERN IN  ORDER TO LAND A PLANE."::
180 PRINT "PRESS ANY KEY FOR MORE IN-  STRUCTIONS."
190 CALL KEY(0,K,S)
200 IF S=0 THEN 190
210 PRINT :::"FLIGHTS SHOULD BE LANDED IN THE ORDER THAT THEY ARRIVE."
220 PRINT "YOUR GOAL IS TO SCORE AS    FEW DEMERITS AS POSSIBLE.   YOU SCORE DEMERITS BY LEAV-"
230 PRINT "ING FLIGHTS IN HOLDING PAT- TERNS FOR LONG PERIODS, BY ASSIGNING INCOMING FLIGHTS"
240 PRINT "TO HOLDING PATTERNS WHICH   ALREADY HAVE FLIGHTS IN THEM"
250 PRINT "OR BY FORGETTING WHERE a    FLIGHT IS. THE AIRLINES"
260 PRINT "THAT SERVE YOUR AIRPORT ARE AIRTRAVEL, AMER-AIR, SOUTH, AIREAST, TIAIR, CTR, NJAIR,"
270 PRINT "AND PRONTO. MAKE SURE THAT  YOU SPELL THESE CORRECTLY."::
280 PRINT "HIT ANY KEY TO BEGIN."
290 CALL KEY(0,K,S)
300 R=RND
310 IF S=0 THEN 290
320 CALL CLEAR
330 DIM A(8),A$(8)
340 RANDOMIZE
350 FOR Q=1 TO 8
360 A$(Q)="EMPTY"
370 A(Q)=0
380 NEXT Q
390 SCORE=0
400 COUNT=0
410 R=INT(RND*8)+1
420 ON R GOSUB 1000,1020,1040,1060,1080,1100,1120,1140
430 PRINT :::"A FLIGHT FROM ";B$
440 PRINT "IS APPROACHING. WHICH HOLD- ING PATTERN DO YOU WANT TO ASSIGN IT TO?"
450 INPUT C
460 IF (C>0)*(C<9)THEN 490
470 PRINT "NO SUCH PATTERN. TRY AGAIN."
480 GOTO 450
490 IF A$(C)="EMPTY" THEN 510
500 GOTO 970
510 A$(C)=B$
520 A(C)=0
530 COUNT=COUNT+1
540 IF INT(COUNT/3)=COUNT/3 THEN 410
550 PRINT :::"A RUNWAY IS CLEAR. WHICH    FLIGHT DO YOU WISH TO LAND?"
560 INPUT D$
570 IF D$="AIRTRAVEL" THEN 670
580 IF D$="AMER-AIR" THEN 670
590 IF D$="AIREAST" THEN 670
600 IF D$="TIAIR" THEN 670
610 IF D$="CTR" THEN 670
620 IF D$="SOUTH" THEN 670
630 IF D$="NJAIR" THEN 670
640 IF D$="PRONTO" THEN 670
650 PRINT :::"THERE IS NO SUCH FLIGHT.    TRY AGAIN."
660 GOTO 560
670 PRINT ::"WHICH HOLDING PATTERN IS IT IN?"
680 INPUT E
690 IF (E>0)*(E<9)THEN 720
700 PRINT "NO SUCH PATTERN. TRY AGAIN."
710 GOTO 680
720 IF A$(E)=D$ THEN 800
730 IF A$(E)="EMPTY" THEN 770
740 PRINT :::"HOLDING PATTERN";E;"HAS A   FLIGHT FROM ";A$(E)
750 SCORE=SCORE+10
760 GOTO 550
770 PRINT :::"THERE IS NO FLIGHT IN HOLD- ING PATTERN";E
780 SCORE=SCORE+10
790 GOTO 550
800 PRINT :::"THE FLIGHT FROM ";A$(E):"HAS LANDED."
810 FOR K=1 TO A(E)
820 SCORE=SCORE+K
830 NEXT K
840 A(E)=0
850 A$(E)="EMPTY"
860 FOR Q=1 TO 8
870 A(Q)=A(Q)+1
880 IF A(Q)<6 THEN 920
890 IF A$(Q)="EMPTY" THEN 920
900 PRINT :::"THE FLIGHT FROM ";A$(Q):"HAS BEEN IN A HOLDING PAT- TERN FOR A LONG TIME AND"
910 PRINT "THE PILOT IS COMPLAINING."
920 NEXT Q
930 T=T+1
940 IF T>16 THEN 1160
950 IF COUNT>16 THEN 550
960 GOTO 410
970 PRINT ::"LOOK OUT. YOU ALMOST CAUSED A CRASH. HOLDING PATTERN";C:"ALREADY HAS A FLIGHT FROM":A$(C)
980 SCORE=SCORE+10
990 GOTO 430
1000 B$="AMER-AIR"
1010 RETURN
1020 B$="SOUTH"
1030 RETURN
1040 B$="AIREAST"
1050 RETURN
1060 B$="AIRTRAVEL"
1070 RETURN
1080 B$="TIAIR"
1090 RETURN
1100 B$="CTR"
1110 RETURN
1120 B$="PRONTO"
1130 RETURN
1140 B$="NJAIR"
1150 RETURN
1160 SCORE=SCORE-90
1170 CALL CLEAR
1180 PRINT "YOU EARNED";SCORE;"DEMERITS."::::::::
1190 END

Think all the bugs are out!



#40 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Tue Feb 27, 2018 4:38 AM

Car Dealer
Skill area: Strategy
Level: 3
 
Whether you remain in the automobile selling business or not depends on how much money you make over an eight-month period. You sell five kinds of cars: compact, mid-size, full-size, luxury, and sports cars. The following table shows the cost and selling price of each type of car.
 
Cost Price
 Compact Cars $ 5600 $ 6000
 Mid-size Cars $ 6600 $ 7000
 Full-size Cars $ 7500 $ 8000
 Luxury Cars $ 10300 $ 11000
 Sports Cars $ 11000 $ 12000
 
In a typical month, you can expect to sell about 20 cars if you have the appropriate cars in stock. You can order as many cars as you want, but you must pay 2 percent interest a month on the cost of all unsold cars in stock. The exact number of customers that you will have each month and the types of cars that they will want will vary widely,but in general, the less expensive the car, the more you will sell.
 
Youwill have to share half of the profit on each car with the salesperson who sold it.
 
One way that you can increase sales is by advertising. Advertising will cost $600 per month, but it should increase your sales by about three cars a month.
 
In a good month, you should have a net profit of about $3000.
 
 
Car Dealer
 
100 REM CAR DEALER
110 REM
120 CALL CLEAR
130 PRINT TAB(8);"CAR DEALER"::
140 PRINT "YOU ARE A CAR DEALER WHO    SELLS FIVE TYPES OF CARS."
150 PRINT "COMPACT CARS, MIDSIZE CARS, FULLSIZE CARS, LUXURY CARS, AND SPORTS CARS."
160 PRINT "THE FOLLOWING TABLE SHOWS   THE COST AND SELLING PRICE OF EACH TYPE OF CAR."::
170 PRINT TAB(15);"COST";TAB(21);"PRICE"
180 PRINT "COMPACT CARS";TAB(15);"5600";TAB(22);"6000"
190 PRINT "MIDSIZE CARS";TAB(15);"6600";TAB(22);"7000"
200 PRINT "FULLSIZE CARS";TAB(15);"7500";TAB(22);"8000"
210 PRINT "LUXURY CARS";TAB(14);"10300";TAB(21);"11000"
220 PRINT "SPORTS CARS";TAB(14);"11000";TAB(21);"12000"
230 PRINT :"HIT ANY KEY FOR MORE        INSTRUCTIONS."
240 CALL KEY(0,K,S)
250 IF S=0 THEN 240
260 PRINT :::"IN A TYPICAL MONTH,YOU CAN EXPECT TO SELL ABOUT 20     CARS. YOU CAN ORDER AS MANY"
270 PRINT "CARS AS YOU WISH TO HAVE IN STOCK, BUT YOU MUST PAY 2% INTEREST A MONTH ON THE COST"
280 PRINT "OF ALL UNSOLD CARS FOR THAT"
290 PRINT "MONTH. GENERALLY, THE LESS EXPENSIVE THE CAR, THE MORE YOU WILL SELL."
300 PRINT "YOU HAVE TO SHARE HALF OF   THE PROFIT ON EACH CAR WITH THE SALESPERSON WHO SOLD IT"
310 PRINT "IF YOU WISH TO ADVERTISE,   lT WILL COST YOU $600 FOR   EACH MONTH, BUT YOU SHOULD"
320 PRINT "SELL ABOUT THREE MORE CARS EACH MONTH THAT YOU ADVERT- ISE."
330 PRINT "HIT ANY KEY TO BEGIN."
340 CALL KEY(0,K,S)
350 IF S=0 THEN 340
360 CALL CLEAR
370 RANDOMIZE
380 FOR MONTH=1 TO 8
390 CALL CLEAR
400 Z=27
410 PRINT TAB(10);"MONTH";MONTH::
420 ON MONTH GOSUB 1610,1610,1580,1620,1610,1580,1620,1610
430 PRINT TAB(9);"INVENTORY"::
440 PRINT TAB(2);"COMPACT CARS";TAB(19);COMPACT
450 PRINT TAB(2);"MIDSIZE CARS";TAB(19);MIDSIZE


460 PRINT TAB(2);"FULLSIZE CARS";TAB(19);FULLSIZE
470 PRINT TAB(2);"LUXURY CARS";TAB(19);LUXURY
480 PRINT TAB(2);"SPORTS CARS";TAB(19);SPORTS::
490 ADV=0
500 PRINT "DO YOU WISH TO ADVERTISE    THIS MONTH (Y OR N)?"
510 CALL KEY(0,K,Q)
520 IF (K=89)+(K=121)THEN 1720
530 IF (K=78)+(K=110)THEN 550
540 GO TO 510
550 PRINT : : "HOW MANY CARS OF EACH TYPE DO YOU WISH TO ORDER?": :
560 INPUT "COMPACT CARS ":C
570 INPUT "MIDSIZE CARS ":M
580 INPUT "FULLSIZE CARS ":F
590 INPUT "LUXURY CARS ":L
600 INPUT "SPORTS CARS ":S
610 COMPACT=COMPACT+C
620 MIDSIZE=MIDSIZE+M
630 FULLSIZE=FULLSIZE+F
640 LUXURY=LUXURY+L
650 SPORTS=SPORTS+S
660 OWED=OWED+5600*C+6600*M+7500*F+10300*L+11000*S
670 FOR I=1 TO Z
680 R=INT(RND*20)+1
690 IF R=1 THEN 1230
700 IF R<4 THEN 1300
710 IF R<7 THEN 1370
720 IF R<11 THEN 1440
730 IF R<16 THEN 1510
740 NEXT I
750 CUST=CBUYER+MBUYER+FBUYER+LBUYER+SBUYER
760 PRINT :"YOU SOLD";CUST;"CARS THIS "
770 PRINT "MONTH. THE FOLLOWING CARS   WERE SOLD:"
780 PRINT TAB(2);"COMPACT CARS",-TAB(19);CBUYER
790 PRINT TAB(2);"MIDSIZE CARS";TAB(19);MBUYER
800 PRINT TAB(2);r "FULLSIZE CARS";TAB(19);FBUYER
810 PRINT TAB(2);"LUXURY CARS";TAB(19);LBUYER
820 PRINT TAB(2);"SPORTS CARS";TAB(19);SBUYER::
830 MISSED=NC+NM+NF+NL+NS
840 PRINT "YOU MISSED THE FOLLOWING    SALES BECAUSE YOU DIDN'T    HAVE CARS IN STOCK:"
850 PRINT TAB(2);"COMPACT CARS";TAB(19);NC
860 PRINT TAB(2);"MIDSIZE CARS";TAB(19);NM
870 PRINT TAB(2);"FULLSIZE CARS";TAB(19);NF
880 PRINT TAB(2);"LUXURY CARS";TAB(19);NL
890 PRINT TAB(2),-"SPORTS CARS";TAB(19);NS
900 PRINT
910 NS=0
920 NL=0
930 NF=0
940 NM=0
950 NC=0
960 P=200*CBUYER+200*MBUYER+250*FBUYER+350*LBUYER+500*SBUYER
970 PRINT :"HIT ANY KEY TO CONTINUE."
980 CALL KEY(0,KfSTATUS)
990 IF STATUS=0 THEN 980
1000 PRINT ::"THIS MONTH GROSS PROFIT WAS $";P*2;"BUT YOUR INTEREST"
1010 PRINT "WAS $";INT(.02*OWED);"AND YOU"
1020 PRINT "HAD TO PAY $";P;"TO YOUR"
1030 PRINT "SALES STAFF."
1040 IF ADV=600 THEN 1750
1050 PRINT "YOUR NET PROFIT FOR THE     MONTH WAS $";P-ADV-INT(.02*OWED)
1060 NET=NET+P-ADV-INT(.02*OWED)
1070 OWED=INT(1.02*OWED)
1080 SBUYER=0
1090 LBUYER=0
1100 FBUYER=0
1110 MBUYER=0
1120 CBUYER=0
1130 PRINT :"HIT ANY KEY TO CONTINUE."
1140 CALL KEY(0,K,STATUS)
1150 IF STATUS=0 THEN 1140
1160 NEXT MONTH
1170 PRINT :::"NET PROFIT WAS $";NET:::
1180 IF NET>27000 THEN 1660
1190 IF NET>22500 THEN 1680
1200 IF NET>18000 THEN 1700
1210 PRINT "YOUR PERFORMANCE WAS POOR!"
1220 END
1230 IF SPORTS=0 THEN 1280
1240 SPORTS=SPORTS-1
1250 SBUYER=SBUYER+1
1260 OWED=OWED-11000
1270 GOTO 740
1280 NS=NS+1
1290 GOTO 740
1300 IF LUXURY=0 THEN 1350
1310 LUXURY=LUXURY-1
1320 LBUYER=LBUYER+1
1330 OWED=OWED-10300
1340 GOTO 740
1350 NL=NL+1
1360 GOTO 740
1370 IF FULLSIZE=0 THEN 1420
1380 FULLSIZE=FULLSIZE-1
1390 FBUYER=FBUYER+1
1400 OWED=OWED-7500
1410 GOTO 740
1420 NF=NF+1
1430 GOTO 740
1440 IF MIDSIZE=0 THEN 1490
1450 MIDSIZE=MIDSIZE-1
1460 MBUYER=MBUYER+1
1470 OWED=OWED-6600
1480 GOTO 740
1490 NM=NM+1
1500 GOTO 740
1510 IF COMPACT=0 THEN 1560
1520 COMPACT=COMPACT-1
1530 CBUYER=CBUYER+1
1540 OWED=OWED-5600
1550 GOTO 740
1560 NC=NC+1
1570 GOTO 740
1580 PRINT "THIS MONTH YOU CAN EXPECT   TO SELL ABOUT 5 MORE CARS   THAN USUAL."
1590 PRINT
1600 Z=33
1610 RETURN
1620 PRINT "THIS MONTH YOU CAN EXPECT   TO SELL ABOUT FIVE FEWER    CARS THAN USUAL."
1630 PRINT
1640 Z=20
1650 RETURN
1660 PRINT "AN EXCELLENT PERFORMANCE I"
1670 END
1680 PRINT "YOUR PERFORMANCE WAS GOODI"
1690 END
1700 PRINT "ONLY A FAIR PERFORMANCE!"
1710 END
1720 Z=Z+4
1730 ADV=600
1740 GOTO 550
1750 PRINT "IN ADDITION, ADVERTISING    COST YOU $600."
1760 GOTO 1050
 
FOR-NEST ERROR!


#41 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Tue Feb 27, 2018 5:32 AM

Blackjack
Skill area: Strategy
Level 3
 
"Blackjack" is an extremely popular casino card game in which the dealer plays against one or more players. In this version of Black jack, the computer is the dealer and up to four players can play.
 
The object of the game is to have a hand in which the point total is higher than that of the dealer, but not greater than 21. In computing the value of a hand, each number card is worth that number, each face card is worth ten, and an ace can be counted as either one or eleven.
 
You are initially dealt two cards. The dealer is also dealt two cards, but only one of them is shown. You look at your two cards, and then make one of several decisions. The usual choices are to "hit/' in which you take another card, or to "stand," in which you accept the hand as it is. You may continue to ask for hits as often as you want. However, if the value of the hand exceeds 21, then you have "busted" and havelost the hand. Once you stand, your turn is over.
 
The term blackjack refers to a two-card hand which totals exactly 21, an ace and a card which is worth ten. If you are dealt blackjack, you immediately receive one-and-a-halftimes your bet (unless the dealer also has blackjack). If the dealer'sup card is either an ace or a ten, the dealer checks the other card immediately to determine if the hand is a blackjack. If the dealer (the computer)has blackjack, it immediately wins all bets except for those in which you or another player also has blackjack.
 
When you have only two cards, you have another option, called doubling down. When you double down, the bet is doubled, and you receive one and only one card. It is a good strategy to double down with a hand where the two cards together total ten or eleven, because the most likely card that you will receive is a ten or a face card.
 
If your first two cards are the same, you can split them into two hands. Each of the two hands then receives a second card, and each of the two hands is then played exactly like any other hand (except that blackjack only pays even money, and splitting or doubling down is not permitted). You must bet the same amount on the second hand that you bet on the first one.
 
After all of the players have played their hands, the dealer reveals its second card and then plays the hand. The dealer must always hit if its hand totals 16 or less and must always stand if the hand totals 17 or more. After the dealer is through playing, each hand is compared to the dealer's. If the dealer's total is greater than yours, the dealer wins and you lose the bet. If your total is greater than that of the dealer(but not more than 21), you win, and the dealer pays you an amount equal to your bet. A tie is called a push, and neither wins. If the dealer busts (takes a hit which makes the total of the hand greater than 21) all players win except those who have already busted. In these cases the dealer wins.
 
The program initially asks how many players there are, and then asks for the name of each. Then it asks how many decks of cards the dealer should play with. This can be any number between 1 and 6. The number of decks can be important, because certain blackjack players are able to keep track of the cards that have been played so far, and adjust their strategy accordingly. Whenever the number of remaining cards is low,the dealer shuffles, and players who are keeping track of what has been played must start counting all over again.
 
Each player starts with a stake of $1000. At the beginning of each hand, the program asks you how much you want to bet on that hand. There is a maximum bet of $500, and, of course, you cannot bet more than your stake.
 
Once each player has bet, the hand begins. First, the dealer's up card is shown. Then, if the dealer's hand is not blackjack, the first two cards of the first player's hand are shown. If you wish to stand, press the zero key;to hit, press the one key;to double down, you should press the two key;and to split,press the three key. Splitting is only permitted if your two cards are the same, and pressing the three key will have no effect if splitting is not permitted.
 
If you hit, a third card is shown. If you bust, your hand disappears. Otherwise, you must again choose between hitting and standing. You may hit as often as you wish as long as the value of your hand is not more than 21, but once you stand, your turn is over, and the name and first two cards of the next player are shown.
 
Once you have indicated your intention to split your hand the second card will disappear; it will reappear when you finish playing your first hand. Playing of split hands differs only slightly from regular play — splitting your hand a second time and doubling down are not permitted and the pay off for blackjack is reduced to even money.
 
After all of the players have played their hands, the dealer plays. The computer automatically determines the winners and losers of each hand and adjusts the stakes of the players accordingly. If a player's stake is zero or less, they are out of the game.
 
If the dealer's first two cards are a blackjack, both cards are immediately displayed, and the program then displays the first two cards of each player's hand. Players are not given a choice here, since all players have lost unless their hand is also a black jack, in which case, the hand is a push.
 
 
Blackjack
100 REM BLACKJACK
110 REM
120 CALL CLEAR
130 CALL SCREEN(12)
140 PRINT TAB(10);"BLACKJACK":::
150 PRINT " THIS GAME FOLLOWS STANDARD CASINO RULES FOR BLACKJACK."
160 PRINT " TO HIT, USE THE 1 KEY;  TO STAND USE THE 0 (ZERO) KEY, TO DOUBLE, USE THE 2 KEY;"
170 PRINT "AND TO SPLIT, USE THE 3 KEY."
180 PRINT :"HIT ANY KEY TO BEGIN."
190 CALL KEY(0,K,S)
200 IF S=0 THEN 190
210 CALL CLEAR
220 RANDOMIZE
230 CALL CHAR(128,"00000103070F1F3F")
240 CALL CHAR(129,"00000080C0E0F0F8")
250 CALL CHAR(130,"7F3F1F0F07030100")
260 CALL CHAR(131,"FCF8F0E0C0800000")
270 CALL CHAR(132,"0000000C1E3F3F3F")
280 CALL CHAR(133,"00000060F0F8F8F8")
290 CALL CHAR(134,"3F1F0F0703010000")
300 CALL CHAR(135,"F8F0E0C080000000")
310 CALL CHAR(136,"000103070F1F3F3F")
320 CALL CHAR(137,"000080C0E0F0F8F8")
330 CALL CHAR(138,"3F3F3D1901010300")
340 CALL CHAR(139,"F8F8783000008000")
350 CALL CHAR(140,"0003070F0F070319")
360 CALL CHAR(141,"0080C0E0E0C08030")
370 CALL CHAR(142,"3D7F7F3D19010300")
380 CALL CHAR(143,"78FCFC7C30008000")
390 CALL COLOR(13,9,1)


400 INPUT "HOW MANY PLAYERS?":N
410 IF N>4 THEN 1450
420 DIM BET(5),NAME$(5),STAKE(5),HAND(11),ACES(11),CARD(52),SPLIT(11)
430 FOR I=1 TO N
440 PRINT "NAME OF PLAYER";I;
450 INPUT NAME$(I)
460 IF LEN(NAME$(I))>7 THEN 2530
470 STAKE(I)=1000
480 PRINT
490 NEXT I
500 INPUT "NUMBER OF DECKS?":D
510 IF D>6 THEN 2550
520 REM ROUND BEGINS
530 CALL CLEAR
540 FOR I=1 TO N
550 PRINT NAME$(I);"*S STAKE IS $";STAKE(I)
560 PRINT
570 NEXT I
580 PRINT "HIT ANY KEY TO PLAY.         HIT CLEAR TO END."
590 CALL KEY(0,K,S)
600 X=RND
610 IF S=0 THEN 590
620 CALL CLEAR
630 FOR I=1 TO N
640 PRINT NAME$(I);"'S BET? ";
650 INPUT "$":BET(I)
660 IF (BET(I)<0)+(BET(I)>500)THEN 3350
670 IF BET(I)>STAKE(I)THEN 3350
680 PRINT
690 NEXT I
700 FOR I=1 TO 500
710 NEXT I
720 CALL CLEAR
730 PRINT "DEALER"
740 COL=11
750 ROW=22
760 GOSUB 1470
770 IF WORTH=11 THEN 1990
780 HAND(11)=HAND(11)+WORTH
790 DLR2=1
800 GOSUB 1470
810 DLR2=0
820 DV=V
830 DW=W
840 DSUIT=SUIT
850 HAND(11)=HAND(11)+WORTH
860 IF WORTH=11 THEN 1970
870 IF HAND(11)=21 THEN 2630
880 PRINT ::
890 FOR I=1 TO N
900 PRINT NAME$(I)
910 C0L=11
920 ROW=22
930 GOSUB 1470
940 HAND(I)=HAND(I)+WORTH
950 V1=V
960 IF WORTH=11 THEN 2010
970 COL=COL+3
980 GOSUB 1470
990 HAND(I)=HAND(I)+WORTH
1000 if (HAND(I)=21)*(COL=14)THEN 2460
1010 IF W0RTH=11 THEN 1950
1020 IF HAND(I)>21 THEN 2030
1030 CALL KEY(0,K,S)
1040 IF K=48 THEN 1090
1050 IF K=49 THEN 970
1060 IF K=50 THEN 2320
1070 IF K=51 THEN 2790
1080 GOTO 1030
1090 PRINT ::
1100 IF SPLITMODE=1 THEN 2940
1110 NEXT I
1120 ROW=20-N*3-ADDROW
1130 COL=14
1140 V=DV
1150 W=DW
1160 SUIT=DSUIT
1170 GOSUB 1690
1180 GOTO 1230
1190 COL=COL+3
1200 GOSUB 1470
1210 HAND(11)=HAND(11)+WORTH
1220 IF WORTH=11 THEN 2140
1230 IF HAND(11)<17 THEN 1190
1240 IF HAND(11)>21 THEN 2160
1250 FOR I=1 TO N
1260 IF HAND(11)>HAND(I)THEN 2220
1270 IF HAND(11)<HAND(I)THEN 2240
1280 IF SPLIT(I)=1 THEN 3280
1290 NEXT I
1300 FOR I=1 TO 11
1310 HAND(I)=0
1320 ACES(I)=0
1330 SPLIT(I)=0
1340 NEXT I
1350 ADDROW=0
1360 FOR I=1 TO N
1370 IF STAKE(I)<=0 THEN 3370
1380 NEXT I
1390 PRINT "HIT ANY KEY TO CONTINUE."
1400 CALL KEY(0,K,S)
1410 IF S=0 THEN 1400
1420 IF P>D*52-5*N THEN 2260
1430 IF P>D*52-15 THEN 2260
1440 GOTO 520
1450 PRINT "TOO MANY PLAYERS. NO MORE   THAN FOUR CAN PLAY."
1460 GO TO 400
1470 REM ROUTINE TO PICK NEXT CARD.
1480 X=INT(RND*52+1)
1490 IF CARD(X)>=D THEN 1480
1500 CARD(X)=CARD(X)+1
1510 P=P+1
1520 W=32
1530 IF X<14 THEN 1590
1540 IF X<27 THEN 1620
1550 IF X<40 THEN 1650
1560 Y=X-39
1570 SUIT=4
1580 GOTO 1670
1590 Y=X
1600 SUIT=1
1610 GOTO 1670
1620 Y=X-13
1630 SUIT=2
1640 GOTO 1670
1650 Y=X-26
1660 SUIT=3
1670 ON Y GOSUB 1760,1790,1820,1850,1880,1920,1920,1920,1920,1920,1920,1920,1920
1680 IF DLR2=1 THEN 1750
1690 CALL HCHAR(ROW,COL,V)
1700 CALL HCHAR(ROW,COL+1,W)
1710 CALL HCHAR(ROW+1,COL,124+SUIT*4)
1720 CALL HCHAR(ROW+1,COL+1,125+SUIT*4)
1730 CALL HCHAR(ROW+2,COL,126+SUIT*4)
1740 CALL HCHAR(ROW+2,COL+1,127+SUIT*4)
1750 RETURN
1760 V=65
1770 WORTH=11
1780 RETURN
1790 V=75
1800 WORTH=10
1810 RETURN
1820 V=81
1830 WORTH=10
1840 RETURN
1850 V=74
1860 WORTH=10
1870 RETURN
1880 V=49
1890 W=48
1900 WORTH=10
1910 RETURN
1920 V=63-Y
1930 W0RTH=15-Y
1940 RETURN
1950 ACES(I)=ACES(I)+1
1960 GOTO 1020
1970 ACES(11)=ACES(11)+1
1980 GOTO 870
1990 ACES(11)=ACES(11)+1
2000 GOTO 780
2010 ACES(I)=ACES(I)+1
2020 GOTO 970
2030 IF ACES(I)>0 THEN 2110
2040 FOR J=1 TO 500
2050 NEXT J
2060 FOR J=22 TO 24
2070 CALL HCHAR(J,11,32,20)
2080 NEXT J
2090 HAND(I)=0
2100 GOTO 1090
2110 HAND(I)=HAND(I)-10
2120 ACES(I)=ACES(I)-1
2130 GOTO 1030
2140 ACES(11)=ACES(11)+1
2150 GOTO 1230
2160 IF ACES(11)>0 THEN 2190
2170 HAND(11)=1
2180 GOTO 1250
2190 HAND(11)=HAND(11)-10
2200 ACES(11)=ACES(11)-1
2210 GOTO 1230
2220 STAKE(I)=STAKE(I)-BET(I)
2230 GOTO 1280
2240 STAKE(I)=STAKE(I)+BET(I)
2250 GOTO 1280
2260 PRINT "SHUFFLING"
2270 FOR I=1 TO 52
2280 CARD(I)=0
2290 NEXT I
2300 P=0
2310 GOTO 520
2320 IF COL>14 THEN 1030
2330 IF SPLITM0DE=1 THEN 1030
2340 BET(I)=BET(I)*2
2350 CALL HCHAR(22,23,68)
2360 CALL HCHAR(22,24,66)
2370 CALL HCHAR(22,25,76)
2380 C0L=C0L+3
2390 GOSUB 1470
2400 HAND(I)=HAND(I)+WORTH
2410 IF WORTH=11 THEN 2440
2420 IF HAND(I)>21 THEN 2590
2430 GOTO 1090
2440 ACES(I)=ACES(I)+1
2450 GOTO 2420
2460 IF SPLITMODE=1 THEN 1010
2470 BET(I)=1.5*(BET(I))
2480 PRINT TAB(9);"BLACKJACK"
2490 CALL SOUND(500,400,2)
2500 HAND(I)=50
2510 PRINT
2520 GOTO 1100
2530 PRINT "SORRY! NAMES CAN'T HAVE MORETHAN SEVEN LETTERS. TRY     AGAIN."
2540 GOTO 440
2550 PRINT
2560 PRINT "SORRY, THERE MUST BE        BETWEENONE AND SIX DECKS. TRY AGAIN."
2570 PRINT
2580 GOTO 500
2590 IF ACES(I)>0 THEN 2610
2600 GOTO 2040
2610 HAND(I)=HAND(I)-10
2620 GOTO 1090
2630 COL=COL+3
2640 GOSUB 1690
2650 PRINT TAB(9);"BLACKJACK"
2660 PRINT
2670 FOR I=1 TO N
2680 PRINT NAME$(I)
2690 COL=11
2700 ROW=22
2710 GOSUB 1470
2720 HAND(I)=HAND(I)+WORTH
2730 COL=COL+3
2740 GOSUB 1470
2750 HAND(I)=HAND(I)+WORTH
2760 PRINT ::
2770 NEXT I
2780 GOTO 1250
2790 IF COL<>14 THEN 1030
2800 IF V1<>V THEN 1030
2810 IF SPLITMODE=1 THEN 1030
2820 TEMPV=V
2830 TEMPW=W
2840 TEMPSUIT=SUIT
2850 TEMPWORTH=WORTH
2860 IF V=65 THEN 3480
2870 HAND(I)=HAND(I)-W0RTH
2880 CALL VCHAR(22,14,32,3)
2890 CALL VCHAR(22,15,32,3)
2900 SPLITM0DE=1
2910 SPLIT(I)=1
2920 ADDR0W=ADDR0W+3
2930 GOTO 980
2940 SPLITMODE=0
2950 PRINT NAME$(I)
2960 COL=11
2970 V=TEMPV
2980 W=TEMPW
2990 SUIT=TEMPSUIT
3000 WORTH=TEMPWORTH
3010 GOSUB 1690
3020 GOTO 3040
3030 GOSUB 1470
3040 HAND(I+5)=HAND(I+5)+WORTH
3050 IF WORTH=11 THEN 3130
3060 COL=COL+3
3070 IF HAND(5+I)>21 THEN 3150
3080 IF COL=14 THEN 3030
3090 CALL KEY(0,K,S)
3100 IF K=48 THEN 1090
3110 IF K=49 THEN 3030
3120 GOTO 3090
3130 ACES(5+I)=ACES(5+I)+1
3140 GOTO 3060
3150 IF ACES(5+1)>0 THEN 3230
3160 FOR J=1 TO 500
3170 NEXT J
3180 FOR J=22 TO 24
3190 CALL HCHAR(J,11,32,20)
3200 NEXT J
3210 HAND(5+I)=0
3220 GOTO 1090
3230 HAND(I+5)=HAND(I+5)-10
3240 ACES(1+5)=ACES(1+5)-1
3250 GOTO 3090
3260 HAND(1+5)=HAND(1+5)-10
3270 GOTO 1090
3280 IF HAND(11)>HAND(I+5)THEN 3310
3290 IF HAND(11)<HAND(I+5)THEN 3330
3300 GOTO 1290
3310 STAKE(I)=STAKE(I)-BET(I)
3320 GOTO 1290
3330 STAKE(I)=STAKE(I)+BET(I)
3340 GOTO 1290
3350 PRINT "INELIGIBLE BET. TRY AGAIN."
3360 GOTO 650
3370 PRINT NAME$(I);" IS BROKE."
3380 M=N-I
3390 IF M=0 THEN 3440
3400 FOR J=1 TO M
3410 NAME$(I-1+J)=NAME$(I+J)
3420 STAKE(I-1+J)=STAKE(I+J)
3430 NEXT J
3440 N=N-1
3450 IF N=0 THEN 3470
3460 GOTO 1380
3470 END
3480 HAND(I)=22
3490 ACES(5+1)=1
3500 GOTO 2870

Think I got all the bugs! Some tiny in graphics.


#42 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Tue Feb 27, 2018 6:04 AM

Investments
Skill area: Strategy
Level: 3
 
You have just inherited $50,000 from your rich uncle, but one of the stipulations of the will was that you could not spend any of the money for six years. You plan to invest this money as wisely as possible so that in six years, when you have access to the money, you will have as much as possible.
 
 
There are six types of investments available to you:
 1. The Alpha Steel Company —This is a large steel manufacturing company whose profits seem to rise and fall with the economy. It is currently selling at $50 per share and is paying a dividend of $3 per share.
 2. Moonbeam Oil — This is a medium-sized firm that drills for oil and gas. Its profits depend primarily on how lucky it is in finding oil or gas. If they have a big strike, owners of this stock could do very well. It is currently selling at $40 a share and is paying a dividend of $1.20 a share.
 3. Omega Computers —This is a small, high-tech firm that manufactures components for microcomputers. This is a new firm, so there is more risk involved. It is not presently paying a dividend.
 4. Long-term bonds —Long-term bonds are now paying a coupon rate of $90 for a $1000 bond, which amounts to an interest rate of 9 percent. If interest rates go up, the value of these bonds decreases; if interest rates go down, the value of these bonds increases.
 5. Gold —Gold pays no interest or dividends, but is an excellent hedge against inflation.
 6. The Beta Cash Reserves —This is a money market fund. The interest rate that it pays changes depending on short-term interest rates in general. There is no risk of losing your investment.
 
Any money which is not invested is automatically placed in your bank account, which pays 5 percent interest.
 
The value of these investments over the six-year period is determined by the Gross National Product (GNP), which is an indicator of the overall health of the economy, the inflation rate, and interest rates. Interest rates tend to rise and fall with the inflation rate. There is a random factor to consider as well.
 
Occasionally economists will make predictions about the economic conditions for next year. As in the real world, their predictions are sometimes wrong.
 
On each of the six rounds, corresponding to the six years, you will have the choice of buying as much of each of these as you can afford, or selling whatever you own, depending on market conditions.
 
A word of advice: Buy low, sell high.
 
 
Investments
100 REM INVESTMENTS
110 REM
120 CALL CLEAR
130 RANDOMIZE
140 PRINT TAB(10);"INVESTMENTS": :
150 PRINT " YOU HAVE JUST INHERITED   $50,000, BUT YOU CAN'T SPEND ANY OF THE MONEY FOR SIX"
160 PRINT "YEARS. YOUR GOAL IS TO IN- VEST YOUR MONEY TO MAXIMIZE YOUR RETURN OVER A SIX YEAR"
170 PRINT "PERIOD. YOU HAVE SIX POS-   SIBLE INVESTMENTS."::
180 PRINT "1. THE ALPHA STEEL COMPANY: THIS IS A LARGE STEEL MANU- FACTURING COMPANY. IT PAYS"
190 PRINT "A DIVIDEND OF $3.00 A SHARE."::
200 PRINT "2. MOONBEAM OIL: THIS IS A MEDIUM SIZE FIRM WHICH      DRILLS FOR OIL AND NATURA L"
210 PRINT "GAS. IT PAYS A DIVIDEND OF $1.20 A SHARE. ": :
220 PRINT "HIT ANY KEY TO CONTINUE."
230 CALL KEY(0,K,S)
240 R=RND
250 IF S=0 THEN 230
260 PRINT :::::"3. OMEGA COMPUTER COMPANY: THIS IS A SMALL HIGH TECH   COMPANY WHICH MAKES MICRO"
270 PRINT "COMPUTER COMPONENTS. IT IS  NOT PAYING A DIVIDEND NOW."::
280 PRINT "4. LONG TERM BONDS: THESE   ARE NOW PAYING $90 PER YEAR WHICH IS A CURRENT RETURN"
290 PRINT "RATE OF 9%. HOWEVER, IF     INTEREST RATES GO DOWN,"
300 PRINT "THESE INCREASE IN VALUE, AND IF INTEREST RATES GO UP,    THESE LOSE VALUE."::
310 PRINT "5. GOLD: THIS PAYS NO DIVI- DEND OR INTEREST BUT IS A   GOOD HEDGE AGAINST INFLATION"::
320 PRINT "HIT ANY KEY TO CONTINUE."
330 CALL KEY(0,K,S)
340 IF S=0 THEN 330
350 PRINT :::::"6. BETA CASH RESERVES: A    MONEY MARKET FUND WHOSE INT-EREST RATES CHANGE DAILY.":::
360 PRINT ::"ANY MONEY NOT INVESTED IS"
370 PRINT "AUTOMATICALLY PUT IN YOUR   BANK ACCOUNT WHICH PAYS 5%  INTEREST."
380 PRINT "HIT ANY KEY TO CONTINUE.":
390 CALL KEY(0,K,S)
400 IF S=0 THEN 390
410 DIM WORTH(6),NAME$(6),P$(6),Q$(6),OWNED(6),OLDPRICE(5)
420 FOR N=1 TO 6
430 READ NAME$(N),WORTH(N),P$(N),Q$(N)
440 OWNED(N)=0
450 NEXT N
460 DATA ALPHA STEEL,50,A SHARE,SHARES
470 DATA MOONBEAM OIL,40,A SHARE,SHARES
480 DATA OMEGA COMPUTER,30,A SHARE,SHARES
490 DATA A LONG TERM BOND,1000,,BONDS
500 DATA GOLD,400,AN OUNCE,OUNCES
510 DATA BETA CASH RESERVES,1,A SHARE,SHARES
520 BANK=50000
530 FOR YEAR=1 TO 6
540 CALL CLEAR
550 PRINT "THERE IS NOW $";BANK;"IN":"YOUR BANK ACCOUNT."::::
560 FOR N=1 TO 6
570 IF OWNED(N)=0 THEN 700
580 PRINT ::NAME$(N);" IS SELLING"
590 PRINT "AT $";WORTH(N);P$(N):
600 PRINT "YOU NOW OWN";OWNED(N);Q$(N):
610 PRINT "HOW MANY ";Q$(N);" DO YOU":"WANT TO SELL?"
620 INPUT SELL
630 IF SELL<1 THEN 700
640 IF SELL>OWNED(N)THEN 680
650 OWNED(N)=OWNED(N)-SELL
660 BANK=BANK+INT(SELL*WORTH(N))
670 GOTO 700
680 PRINT "TRY AGAIN."
690 GOTO 600
700 NEXT N
710 FOR N=1 TO 6
720 PRINT ::NAME$(N);" IS NOW SELLING":"AT $";WORTH(N);P$(N);". HOW MANY":Q$(N);" DO YOU WISH TO BUY."
730 INPUT BUY
740 IF BUY*WORTH(N)>BANK THEN 780
750 OWNED(N)=OWNED(N)+BUY
760 BANK=BANK-BUY*WORTH(N)
770 GOTO 800
780 PRINT "YOU CAN'T AFFORD THAT MANY. TRY AGAIN."
790 GOTO 720
800 NEXT N
810 IF BANK=0 THEN 830
820 PRINT "THERE IS $";BANK;"IN YOUR BANK ACCOUNT.": :
830 X=INT(RND*ll-3)+A
840 IF X<0 THEN 880
850 IF X>0 THEN 900
860 PRINT ::"THERE WAS NO CHANGE IN THE GNP THIS YEAR."
870 GOTO 910
880 PRINT ::"THE GNP WAS DOWN";-X;"%":"THIS YEAR."
890 GOTO 910
900 PRINT ::"THE GNP WAS UP";X;"%":"THIS YEAR."
910 Y=X+INT(RND*5+1)+B-A
920 IF Y>1 THEN 940
930 Y=l
940 PRINT :"THE INFLATION RATE WAS";Y;"%":"THIS YEAR."
950 Z=Y+INT(RND*6-1)
960 IF Z>3 THEN 980
970 Z=4
980 PRINT :"THE INTEREST RATE PAID ON   MONEY MARKET FUNDS WAS ";Z;"%":"THIS YEAR."
990 FOR N=1 TO 5
1000 OLDPRICE(N)=WORTH(N)
1010 NEXT N
1020 WORTH(1)=INT(WORTH(1)+WORTH(1)*((X-1)/100)*INT(RND*5+1))
1030 WORTH(2)=INT(WORTH(2)+WORHT(2)*(RND/5))-3
1040 WORTH(3)=INT(WORTH(3)*(1+RND-.5)+X)
1050 WORTH(4)=INT(10000/(Z+2))
1060 DIFF=OLDPRICE(4)-WORTH(4)
1070 WORTH(4)=INT(OLDPRICE(4)-DIFF/2)
1080 WORTH(5)=INT(WORTH(5) + (WORTH(5)*5*(Y-4)/100))
1090 FOR N=1 TO 5
1100 DIFF=OLDPRICE(N)-WORTH(N)
1110 IF DIFF>0 THEN 1150
1120 IF DIFF<0 THEN 1170
1130 PRINT :NAME$(N);" WAS UNCHANGED."
1140 GOTO 1180
1150 PRINT :NAME$(N);" WAS DOWN $";DIFF
1160 GOTO 1180
1170 PRINT :NAME$(N);" WAS UP $";-DIFF
1180 NEXT N
1190 PRINT :"HIT ANY KEY TO CONTINUE."
1200 CALL KEY(0,K,S)
1210 IF S=0 THEN 1200
1220 IF RND<.9 THEN 1280
1230 FOR DELAY=1 TO 500
1240 NEXT DELAY
1250 PRINT ::"NEWS FLASH 1":"MOONBEAM OIL HAS JUST STRUCK A MAJOR NEW FIELD OF NATURAL GAS. THE BOARD OF DIRECTORS"
1260 PRINT "HAS ANNOUNCED A 2 FOR l     STOCK SPLIT."
1270 OWNED(2)=OWNED(2)*2
1280 OLDBANK=BANK
1290 BANK=INT(1.05*BANK+3*OWNED(1)+1.2*OWNED(2)+90*OWNED(4)+Z*OWNED(6)/100)
1300 PRINT ::"YOU EARNED $";BANK-OLDBANK;"IN":"INTEREST AND DIVIDENDS."
1310 TOTAL=0
1320 FOR N=l TO 6
1330 TOTAL=TOTAL+OWNED(N)*WORTH(N)
1340 NEXT N
1350 TOTAL=TOTAL+BANK
1360 PRINT ::"YOUR TOTAL WORTH IS NOW     $";TOTAL::::
1370 ON YEAR GOSUB 1450,1570,1490,1530,1610,1630
1380 PRINT ::"HIT ANY KEY TO CONTINUE."
1390 CALL KEY(0,K,S)
1400 IF S=0 THEN 1390
1410 NEXT YEAR
1420 CALL CLEAR
1430 PRINT "NOT BAD I YOU STARTED WITH   $50,000 AND ENDED UP WITH":"$";TOTAL:::::
1440 END
1450 A=-3
1460 B=0
1470 PRINT "ECONOMISTS ARE PREDICTING A RECESSION FOR NEXT YEAR."::
1480 RETURN
1490 A=3
1500 B=0
1510 PRINT "ECONOMISTS ARE PREDICTING AN ECONOMIC BOOM NEXT YEAR."::
1520 RETURN
1530 A=0
1540 B=+3
1550 PRINT "ECONOMISTS ARE PREDICTING   HIGHER INFLATION NEXT YEAR."::
1560 RETURN
1570 A=0
1580 B=-3
1590 PRINT "ECONOMISTS ARE PREDICTING   LOWER INFLATION NEXT YEAR."::
1600 RETURN
1610 A=0
1620 B=0
1630 RETURN
 
First time debugging, might be more bugs!


#43 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Tue Feb 27, 2018 6:23 AM

Number Sequences
Skill area: Mathematics and Logic
Level-3
 
A number sequence is a series of numbers which follows a rule. For example, the sequence 3, 6, 9,12,15 is a number sequence, and the rule is: add three to the previous number. Of course, rules can be much more complicated; the series 1, 2, 5,14, 41 is a sequence generated by the rule: multiply the previous number by 3, then subtract 1. Problems involving number sequences often appear on aptitude tests such as the college board exams.
 
The computer will present a series of five numbers. In each case there is a rule which produces the sequence. Your goal is to figure out the rule and type in the next number in the series. If you're correct, the computer will tell you, and if you're wrong, the computer will print the correct answer. You then have to enter the next number, and so on. When you have entered two correct answers in a row, the program assumes that you have figured out what the rule is and it goes on to the next problem. The pro gram will also go on to the next problem if you cannot get two correct answers in a row after seeing the first 12 numbers.
 
After solving these 20 problems, try to think up new series and program them.
 
If you are stumped by one or more of the problems, the table following the program will show you what the rules are.
 
 
Number Sequences
100 REM NUMBER SEQUENCES
110 REM
120 DIM N(20)
130 FOR J=1 TO 20
140 CALL CLEAR
150 PRINT TAB(8);"PROBLEM";J::
160 C=0
170 K=1
180 ON J GOSUB 440,470,530,610,670,740,810,890,960,1030,1110,1200,1280,1360,1400,1490,1560,1700,1850,1920
190 IF K>5 THEN 230
200 PRINT TAB(10);N(K)
210 K=K+1
220 GOTO 180 /»>
230 INPUT ANS
240 IF ANS=N(K)THEN 310
250 PRINT TAB(10);N(K)
260 C=0
270 CALL SOUND(300,-3,3)
280 K=K+1
290 IF K>12 THEN 420
300 GOTO 180
310 PRINT "CORRECT";
320 C=C+1
330 IF C=2 THEN 370
340 PRINT TAB(10);N(K)
350 K=K+1
360 GOTO 290
370 PRINT "HIT ANY KEY TO CONTINUE."
380 CALL KEY(0,Q,S)
390 IF S=0 THEN 380
400 NEXT J
410 END
420 PRINT "LET'S TRY ANOTHER ONE."
430 GOTO 370
440 REM ***PROBLEM 1***
450 N(K)=N(K-1)+2
460 RETURN
470 REM ***PROBLEM 2***
480 IF K=1 THEN 510
490 N(K)=2*(N(K-1))
500 RETURN
510 N(K)=1
520 RETURN
530 REM ***PROBLEM 3***
540 IF K=1 THEN 580
550 X=X+1
560 N(K)=N(K-1)+X
570 RETURN
580 N(K)=1
590 X=1
600 RETURN
610 REM ***PROBLEM 4***
620 IF K=1 THEN 650
630 N(K)=N(K-1)/2
640 RETURN
650 N(K)=2048
660 RETURN
670 REM ***PROBLEM 5***
680 IF K=1 THEN 710 t*
690 N(K)=N(K-)+N(K-2)
700 RETURN
710 N(K)=1
720 N(0)=0
730 RETURN
740 REM ***PROBLEM 6***
750 IF K=1 THEN 790
760 X=X+1
770 N(K)=2*X*X
780 RETURN
790 X=0
800 GOTO 760
810 REM ***PROBLEM 7***
820 IF K=1 THEN 860
830 N(K)=X*X
840 X=X-1
850 RETURN
860 X=12
870 GOTO 830
880 RETURN
890 REM ***PROBLEM 8***
900 IF K=1 THEN 940
910 N(K)=X*(X-1)
920 X=X+1
930 RETURN
940 X=2
950 GOTO 910
960 REM ***PROBLEM 9***
970 IF K=1 THEN 1010
980 X=X+1
990 N(K)=XA3
1000 RETURN
1010 X=0
1020 GOTO 980
1030 REM ***PROBLEM 10***
1040 IF K=1 THEN 1080
1050 N(K)=N(K-1)+X*X
1060 X=X+1
1070 RETURN
1080 X=0
1090 N(0)=1
1100 GOTO 1050
1110 REM ***PROBLEM 11***
1120 N(K)=31
1130 IF (K=4)+(K=6)+(K=9)+(K=11)THEN 1160
1140 IF K=2 THEN 1180
1150 RETURN
1160 N(K)=30
1170 RETURN
1180 N(K)=28
1190 RETURN
1200 REM ***PROBLEM 12***
1210 IF K=1 THEN 1250
1220 N(K)=N(K-1)+X
1230 X=X-1
1240 RETURN
1250 X=12
1260 N(0)=0
1270 GOTO 1220
1280 REM ***PROBLEM 13***
1290 IF K=1 THEN 1330
1300 X=X+1
1310 N(K)=N(K-1)*X
1320 RETURN
1330 N(K)=1
1340 X=1
1350 RETURN
1360 REM ***PROBLEM 14***
1370 N(0)=0
1380 N(K)=2*N(K-1)+1
1390 RETURN
1400 REM ***PROBLEM 15***
1410 IF K=1 THEN 1470
1420 X=INT(N(K-1)/100)
1430 Y=INT((N(K-1)-X*100)/10)
1440 Z=N(K-1)-100*X-10*Y
1450 N(K)=N(K-1)+X+Y+Z
1460 RETURN
1470 N(K)=17
1480 RETURN
1490 REM ***PROBLEM 16***
1500 IF K=1 THEN 1540
1510 N(K)=INT((1/X)*1000+.5)
1520 X=X+1
1530 RETURN
1540 X=1
1550 GOTO 1510
1560 REM ***PROBLEM 17***
1570 IF K<4 THEN 1650
1580 X=X+1
1590 V=2
1600 IF INT(X/V)=X/V THEN 1580
1610 V=V+1
1620 IF V<X THEN 1600
1630 N(K)=X
1640 RETURN
1650 N(1)=1
1660 N(2)=2
1670 N(3)=3
1680 X=4
1690 RETURN
1700 REM ***PROBLEM 18***
1710 N(1)=3
1720 N(2)=3
1730 N(3)=5
1740 N(4)=4
1750 N(5)=4
1760 N(6)=3
1770 N(7)=5
1780 N(8)=5
1790 N(9)=4
1800 N(10)=3
1810 N(11)=6
1820 N(12)=6
1830 N(13)=8
1840 RETURN
1850 REM ***PROBLEM 19***
1860 IF K=1 THEN 1900
1870 N(K)=INT(360/X+.5)
1880 X=X-1
1890 RETURN
1900 X=12
1910 GOTO 1870
1920 REM ***PROBLEM 20***
1930 IF K=1 THEN 2000
1940 Z1=INT((X^2)/100)
1950 Z2=INT((X^2-Z1*100)/10)
1960 Z3=X^2-Z1*100-Z2*10
1970 N(K)=Z1+Z2+Z3
1980 X=X+1
1990 RETURN
2000 X=1
2010 GOTO 1940

I think it is bug free! Short test worked!

 
 
Level 3 Games
Rules for Solving the Number Sequence Problems
1. Add 2 to the previous number.
2. Multiply the previous number by 2.
3. Start with 1, add 1 to it, then add 2 to the result, then add 3 to the result, and so on.
4. Start with 2048, divide it by 2, divide that number by 2, divide that number by 2, and so on. The number 2048 was selected to start, because the result is 1 after 12 rounds.
5. Each number in the series is the sum of the two previous numbers.
6. Start with 2, then add 6, then add 10, then add 14, and so on. Alternately, this series can be thought of as 2 times con
7. 12 squared, 11 squared, 10 squared, etc.
8. 1 times 2, 2 times 3, 3 times 4, and so on.
9. 1 cubed, 2 cubed, 3 cubed, etc.
10. Add consecutive squares, i.e., add 1, then add 4 to that, then add 9 to that, and so on.
11. The number of days in each month.
12. Add 12, then add 11, then add 10, and so on.
13. Multiply the previous number by 2, multiply that by 3, multiply that by 4, and so on.
14. Multiply the previous number by 2, and then add 1.
15. Add the sum of the digits of the previous number to the previous number.
16. 1000 divided by 1,1000 divided by 2,1000 divided by 3, and soon.
17. Consecutive prime numbers.
18. The number of letters in one, two, three, and so on.
19. 360 divided by 12, 360 divided by 11, 360 divided by 10, and soon.
20. The sum of the digits in consecutive squares.



With that I am done with this book!

I hope this is OK and of interesse for other TOO! Will look closer at the programs to try to fix bugs. But your free to help. ;)

Mvh
Odd K.

Edited by oddemann, Tue Feb 27, 2018 6:24 AM.


#44 oddemann OFFLINE  

oddemann

    Star Raider

  • Topic Starter
  • 56 posts

Posted Tue Feb 27, 2018 7:44 AM

OK...

Testing stuff...
 


97 REM TESTING
98 REM Dos YOUR compurter post the same RND?
100 FOR I=1 TO 3
200 PRINT "NOT RANDOMIZE";RND
300 NEXT I
400 RANDOMIZE
500 FOR I=1 TO 3
600 PRINT "RANDOMIZE";RND
700 NEXT I

I am doing testing for a game. I want to use RND and do RND put out the same RND on all computes, if you do NOT add "RANDOMIZE"?

I am thinking that this is a good way to have a "standard free" data base that would be the same on all computers. But if it is not the same, then I need to fine another way to "add" as little data as possible in a "smart" way.

My test...

I get the same numbers of not "RANDOMIZE" over and over in Classic99.
first 3 is:
.5291877823
.3913360723
.5343438556
 
PS! How can I add a picture from my test (PrintScrn)?

Edited by oddemann, Tue Feb 27, 2018 7:46 AM.


#45 RXB ONLINE  

RXB

    River Patroller

  • 3,165 posts
  • Location:Vancouver, Washington, USA

Posted Tue Feb 27, 2018 4:41 PM

 

OK...

Testing stuff...
 


97 REM TESTING
98 REM Dos YOUR compurter post the same RND?
100 FOR I=1 TO 3
200 PRINT "NOT RANDOMIZE";RND
300 NEXT I
400 RANDOMIZE
500 FOR I=1 TO 3
600 PRINT "RANDOMIZE";RND
700 NEXT I

I am doing testing for a game. I want to use RND and do RND put out the same RND on all computes, if you do NOT add "RANDOMIZE"?

I am thinking that this is a good way to have a "standard free" data base that would be the same on all computers. But if it is not the same, then I need to fine another way to "add" as little data as possible in a "smart" way.

My test...

I get the same numbers of not "RANDOMIZE" over and over in Classic99.
first 3 is:
.5291877823
.3913360723
.5343438556
 
PS! How can I add a picture from my test (PrintScrn)?

 

RXB 2015 uses the same exact RND (GPL) routine for RND as TI Basic.

The normal XB RND was way to slow and cumberson and I replaced it with the TI Basic version that is faster.



#46 Lee Stewart OFFLINE  

Lee Stewart

    River Patroller

  • 3,695 posts
  • Location:Silver Run, Maryland

Posted Tue Feb 27, 2018 5:54 PM

<snip>

I am doing testing for a game. I want to use RND and do RND put out the same RND on all computes, if you do NOT add "RANDOMIZE"?


I am thinking that this is a good way to have a "standard free" data base that would be the same on all computers. But if it is not the same, then I need to fine another way to "add" as little data as possible in a "smart" way.

My test...

I get the same numbers of not "RANDOMIZE" over and over in Classic99.
first 3 is:
.5291877823
.3913360723
.5343438556

 

Indeed—the sequence of pseudorandom numbers generated is always the same for any given seed.  The sequence at the beginning of a TI Basic program, before any RANDOMIZE statement, always starts with the same seed, so will give the sequence you posted every time it is run.  After RANDOMIZE, another, but different, reproducible sequence will be generated.  This is true of both TI Basic and Extended Basic, but the beginning seed is different for the two Basics and the generator algorithms are also different, so the sequences generated from the same seed will be different.

 

I know the seed for TI Basic is always stored at >83C0 (R0 for the console ISR).  I think that for Extended Basic the seed is stored somewhere else.

 

<snip>

PS! How can I add a picture from my test (PrintScrn)?

 

PrintScreen puts the current, complete screen on the Windows clipboard.  You then need to paste it into your favorite imaging program, save it to an image file type (JPG, PNG, GIF, ...) and then post it from that.  BTW, you can capture the current, top window to the clipboard with Alt+PrintScreen.

 

...lee



#47 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 4,675 posts

Posted Sun Mar 4, 2018 7:49 PM

Thanks for putting all of these up, as they may help increase interest in BASIC/Extended BASIC programming. . .






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users