FOX-INSFOX FOX-INS!BOOT 3 ##0*BASIC
PAGE=&1900
*FX21
CLOSE#0:CHAIN "FOX-INS"
FOX AND HOUNDS
PERSONAL SOFTWARE
BY PAUL WILLIAMS
(
*FX200,3
2 4
< 19,1,3,0,0,0
F 23;8202;0;0;0;
P
Z 10);"F O X & H O U N D S"
d
n " Fox and Hounds is a game of strategy played on a chess board grid. The sole object of the game is to trap the fox which is automatically operated by the computer, with the pieces you control, the hounds."
x " The fox starts from the top of the board and the hounds at the bottom. If the fox reaches the bottom row of the board before being trapped, it has 'won'."
" The fox can move both forwards and backwards, like a bishop in chess, the hounds may move only forwards. All the pieces on the board move diagonally by one square at a time."
" Tally Ho!"
" You can win by surrounding the fox with the hounds so that it cannot move or you can trap it into a corner or against the side of the board."
k " The computer is fairly ruthless - it will not let the fox step into any traps it can spot."
:
* " PRESS ANY KEY TO CONTINUE"
*FX21,0
A$=
! 10);"F O X & H O U N D S"
" After the board has been constructed on the screen you must wait for the cursor to appear in the top right-hand corner. At this point the program is waiting for you to input a set of co-"
" ordinates which relate to the piece you wish to move. This input is expected to be a four character code with the first two characters being the current square reference and the second two"
" being the destination square reference. The input is terminated by pressing RETURN and the computer will then move your hound to the selected square."
" " The computer checks all entered moves for validity and if the move requested is illegal, the input string is deleted and you must try again."
, " All the moves are indexed from the bottom left-hand corner, this being 1,1. The co-ordinates are taken along and then up, that is you quote the column number first, followed by the"
6' " row number to select a square."
@B " The game may be terminated at any point by typing 'STOP'."
J
T+ " PRESS ANY KEY TO LOAD THE GAME"
^ *FX21,0
h A$=
r
| =&1900:"FOX"
4
19,1,3,0,0,0
, 23,224,&CC,&33,&CC,&33,&CC,&33,&CC,&33
(, 23,225,&01,&01,&01,&01,&01,&01,&01,&01
2, 23,226,&C0,&C0,&C0,&C0,&C0,&C0,&C0,&C0
< 23,227,&FF,0,0,0,0,0,0,0
F, 23,228,&FF,&7F,&3F,&1F,&0F,&07,&03,&01
P, 23,229,&01,&03,&07,&0F,&1F,&3F,&7F,&FF
Z, 23,230,&80,&C0,&E0,&F0,&F8,&FC,&FE,&FF
d, 23,231,&FF,&FE,&FC,&F8,&F0,&E0,&C0,&80
n, 23,232,&FF,&FF,&FF,&FF,&F0,&F0,&F0,&F0
x, 23,233,&FF,&FF,&FF,&FF,&FF,&FF,&FF,&FF
, 23,234,&FF,&FF,&FF,&FF,&0F,&0F,&0F,&0F
, 23,235,&F0,&F0,&F0,&F0,&FF,&FF,&FF,&FF
, 23,236,&F0,&F0,&F0,&F0,&F0,&F0,&F0,&F0
, 23,237,&0F,&0F,&0F,&0F,&0F,&0F,&0F,&0F
23,238,0,0,0,0,0,0,0,&FF
! 10);"F O X & H O U N D S"
::"How many hounds:";
"2-4, type 1 for random",Q
Q<1 Q>4 dR@
Q=1 Q=(2)+2
Q=Q*2-1
A$=3,(224))
B$=" "
A(9,9),B(27)
:23,1,0;0;0;0;
"
, A=1 4
6 B=1 3
@, (225);A$;B$;A$;B$;A$;B$;A$;B$;(226)
J B
T B=1 3
^, (225);B$;A$;B$;A$;B$;A$;B$;A$;(226)
h B
r A
| " ";24,(227))
1,0);24,(238))
# I=0 7: I*3+2,26);I+1: I
$ I=0 7: 26,I*3+2);8-I;: I
A=1 27: B(A): A
30,1);"FOX AND"
30,2);"HOUNDS"
30,4);"YOUR MOVE"
8 A=1 8: B=1 8: (A+B)/2=((A+B)/2) A(A,B)=9
B: A
A=1 Q 2:A(8,A)=-1:
A(1,4)=1
X=1:Y=4:Z=1: tvC
X=8
Y=1 Q 2
Z=10: tvC
Y
& X=1
0 Y=1
: A(X,Y)=1 DXB
D Y<>8 Y=Y+1: TzB
N X<>8 X=X+1: TpB
X C=((2)-1)*2-1
b D=-C
l E=X+1:F=Y+C: dxB
v G=1 tTB
S (A(X,F+C)=-1 F+C<1 F+C>8) (A(E+1,F+C)=-1 F+C<1 F+C>8) X<7 TdD
A(E,F)=0 TVC
$ E=X+1:F=Y+D: dxB: G=1 trB
O (A(X,F+D)=-1 F+D<1 F+D>8) (A(E+1,F+D)=-1 F+D<1 F+D>8) TPD
A(E,F)=0 TVC
$ E=X-1:F=Y+C: dxB: G=1 dFB
A(E,F)=0 TVC
$ E=X-1:F=Y+D: dxB: G=1 dZB
A(E,F)=0 TVC
> A(X+1,Y+D)=0 X<8 Y+D>0 Y+D<9 E=X+1:F=Y+D: TVC
> A(X+1,Y+C)=0 X<8 Y+C>0 Y+C<9 E=X+1:F=Y+C: TVC
# 7:30,10)"YOU WIN!!";: dhC
G=1
" E>0 E<9 F>0 F<9 G=0
" A(E,F)=1:A(X,Y)=0:Z=19: tvC
X=E:Y=F:Z=1: tvC
*7 A(8,1)=1 A(8,3)=1 A(8,5)=1 A(8,7)=1 TxD
4: 28,30,8,39,7,23,1,1;0;0;0;:'">"X$:26,23,1,0;0;0;0;
> X$="STOP" :
H (X$)<>4 TtC
R A=(X$,1)):B=9-(X$,2,1))
\ C=(X$,3,1)):D=9-(X$,1))
fK A<1 A>8 B<1 B>8 C<1 C>8 D<1 D>8 2,-15,150,1: TtC
pI A(B,A)<>-1 A(D,C)<>0 B-D<>1 (A-C)<>1 2,-15,150,1: TtC
z+ A(B,A)=0:A(D,C)=-1:X=B:Y=A:Z=19: tvC
X=D:Y=C:Z=10: tvC: TfB
** WIN MESSAGE
' R=1600::30,10)"I WIN";:dhC
K 230,32,229,232,233,234,228,233,231,226,32,235,233,233,236,236,237,32
! 32,32,32,32,32,32,32,32,32
X1=(Y-1)*3+1:Y1=(X-1)*3+1
* X1,Y1);(B(Z));(B(Z+1));(B(Z+2))
. X1,Y1+1);(B(Z+3));(B(Z+4));(B(Z+5))
. X1,Y1+2);(B(Z+6));(B(Z+7));(B(Z+8))
8 30,12)"PRESS ANY"30,13)"KEY TO"30,14)"RESTART";
*FX21,0
A$=
! A(E+1,F+C)=-1 X<7 trB
thB
$ A(E+1,F+D)=-1 tTB
.
tJB
8 I=1600:
B" 7:30,10)"I WIN !!!";:dhC