Fox at Dusk

Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10252 – 10293.

Gallery

Fox at Dusk

Source Code

  10 RAND 
  30 POKE 16418,2
  40 CLS 
  50 PRINT TAB 10;"""FOX AT DUSK""",,,"TRAP THE FOX SO IT CANNOT MOVE. FOX AND HOUNDS MOVE ONE SPACE   DIAGONALLY UP OR DOWN, BUT THE  FOX MAY LEAP OVER A HOUND.","   ENTER MOVES COLUME FIRST THENTHE ROW..E.G. 11 IS BOTTOM LEFT CORNER.",,
  60 PRINT "  AT DUSK THE FOX CAN ONLY BE   SEEN AT THE GAME START, WHEN IT LEAPS OVER A HOUND, OR WHEN A   HOUND TRIES TO MOVE INTO THE    SQUARE THAT THE FOX IS IN.",,,,,,,"WOULD YOU PREFER THE EASIER GAMEWHERE YOU SEE THE FOX WHENEVER  IT MOVES?"
  70 INPUT B$
  80 LET I=B$(1)="Y"
  90 CLS 
 100 PRINT AT 4,0;"  HOW MANY HOUNDS WOULD YOU LIKETO USE?   (FROM THREE TO EIGHT)   "
 110 INPUT H$
 120 IF H$>"8" OR H$<"3" THEN GOTO 110
 130 LET H=CODE H$-28
 140 FAST 
 160 DIM A$(8,8)
 170 LET B$="A>8 OR A<1 OR B>8 OR B<1"
 180 CLS 
 200 POKE 16418,0
 220 FOR A=0 TO 7
 230 FOR B=0 TO 2
 240 LET D=3*(A-2*INT (A/2))
 250 FOR C=0 TO 3
 260 PRINT TAB (D+C*6);"\@@\@@\@@";
 270 NEXT C
 280 NEXT B
 290 NEXT A
 300 PRINT AT 2,25;"FOX AT";TAB 25;"\''\''\''\''\''\''";TAB 26;"DUSK";TAB 26;"\''\''\''\''"
 320 FOR A=1 TO 8
 330 FOR B=1 TO 8
 340 IF (A+B)/2<>INT ((A+B)/2) THEN LET A$(A,B)="B"
 350 NEXT B
 360 NEXT A
 380 FOR A=1 TO 2
 390 FOR B=1 TO 8
 400 IF NOT H THEN GOTO 490
 410 IF A$(B,A)="B" THEN GOTO 470
 420 LET A$(B,A)="H"
 430 LET H=H-1
 440 LET X=B
 450 LET Y=A
 460 GOSUB 1250
 470 NEXT B
 480 NEXT A
 490 SLOW 
 510 LET F=8
 520 LET E=2*INT (1+RND*4)
 530 LET A$(E,F)="F"
 540 GOSUB 1500
 560 PRINT AT 7,26;"%M%O%V%E";TAB 26;"%F%R%O%M";AT 10,27;
 570 GOSUB 1170
 580 LET A=Z
 590 GOSUB 1170
 600 LET B=Z
 610 PRINT AT 12,27;"%T%O";AT 14,27;
 620 GOSUB 1170
 630 LET C=Z
 640 GOSUB 1170
 650 LET D=Z
 670 IF A$(C,D)="F" THEN GOSUB 1500
 690 PRINT AT 7,26;"    ";TAB 26;"    ";AT 10,27;"  ";AT 12,27;"  ";AT 14,27;"  "
 710 IF ABS (A-C)>1 OR ABS (B-D)>1 OR A$(A,B)<>"H" OR A$(C,D)<>" " THEN GOTO 550
 730 LET X=A
 740 LET Y=B
 750 GOSUB 1330
 760 LET A$(A,B)=" "
 770 LET X=C
 780 LET Y=D
 790 GOSUB 1250
 800 LET A$(C,D)="H"
 820 LET M=0
 830 FOR W=F-1 TO F+1 STEP 2
 840 FOR V=E-1 TO E+1 STEP 2
 850 LET A=V
 860 LET B=W
 880 IF VAL B$ THEN GOTO 1000
 890 LET T=0
 910 IF A$(A,B)="H" THEN GOTO 1370
 930 IF A$(A,B)<>" " THEN GOTO 1000
 950 LET T=T+3*RND+(B<F)+(B=1)
 960 IF T<M THEN GOTO 1000
 970 LET Y=B
 980 LET X=A
 990 LET M=T
1000 NEXT V
1010 NEXT W
1030 IF NOT M THEN GOTO 1430
1050 LET A$(E,F)=" "
1060 LET A$(X,Y)="F"
1080 LET G=ABS (E-X)>1
1090 IF G THEN GOSUB 1500
1100 LET E=X
1110 LET F=Y
1130 IF Y=1 THEN GOTO 1470
1150 IF G OR I THEN GOSUB 1500
1160 GOTO 550
1180 IF INKEY$<>"" THEN GOTO 1180
1190 LET C$=INKEY$
1200 IF C$="" THEN GOTO 1190
1210 IF C$>"8" OR C$<"1" THEN GOTO 1180
1220 PRINT C$;
1230 LET Z=CODE C$-28
1240 RETURN 
1260 LET Z=3*(X-1)
1270 PRINT AT 3*(8-Y),Z;"/ \:.";TAB Z;"% % \: ";TAB Z;"\: \ :"
1280 RETURN 
1300 LET Z=3*(E-1)
1310 PRINT AT 3*(8-F),Z;"\:. \.:";TAB Z;"\:'% \':";TAB Z;"\':% \:'"
1320 RETURN 
1340 LET Z=3*(X-1)
1350 PRINT AT 3*(8-Y),Z;"   ";TAB Z;"   ";TAB Z;"   "
1360 RETURN 
1380 LET A=V+(V-E)
1390 LET B=W+(W-F)
1400 IF VAL B$ THEN GOTO 1000
1410 LET T=RND
1420 GOTO 920
1430 GOSUB 1290
1440 PRINT AT 8,25;"%Y%O%U %W%O%N"
1450 PAUSE 40000
1460 GOTO 20
1470 GOSUB 1290
1480 PRINT AT 8,25;"%I %W%I%N"
1490 GOTO 1450
1510 FOR A=1 TO 4
1520 GOSUB 1290
1530 FOR B=1 TO 4
1540 NEXT B
1550 PRINT AT 3*(8-F),Z;"   ";TAB Z;"   ";TAB Z;"   "
1560 NEXT A
1570 RETURN 
1580 CLEAR 
1590 SAVE "1025%9"
1600 RUN 

People

No people associated with this content.

Scroll to Top