	SUBROUTINE PRACT
	COMMON IB(10,10),IA(8,2),IC(8,2),NA,IS1,IS2,CHAR,CLEAR
	LOGICAL*1 CLEAR(6)
	LOGICAL*1 CHAR,ALPHA,IB,POS(4)
	POS(1)="33
	POS(2)="131
	ALPHA='*'
	IF(IA(1,1).NE.0) GOTO 1
	WRITE(5,700)
700	FORMAT(' *** WARNING ***'/' attempt to enter practice mode'/
     C' without hiding stars.  You will be'/
     C' placed in the STAR PLACEMENT mode.'/)
	GOTO 4
1	WRITE(5,2)
	CALL CLOSE(5)
2	FORMAT(////' * PRACTICE MODE *'//' Do you wish to hide stars
     c ?    Y/N-',$)
	READ(5,3,END=13) ANS
3	FORMAT(A1)
	IF(ANS.NE.'Y'.AND.ANS.NE.'y') GOTO 6
4	CALL STARS
C 
C 
6	DO 20 I=1,10
	DO 20 J=1,10
	IF(IB(I,J).NE.'*') IB(I,J)=' '
20	CONTINUE
	CHAR='a'
	POS(4)="40
	POS(3)=54
	WRITE(5,5) POS
5	FORMAT(X,4A1/////' * PRACTICE MODE *'/
     C' In this practice mode you will be able to send in rays and'/
     C' watch them as they pass through the BLACK BOX.  The star'/
     C' pattern in the practice mode is displayed in the box.'//
     C' Choose a ray entry point (1-32) and enter that number to'/
     C' send a ray through the box.  Enter a negative number to'/
     C' exit the practice mode.  CNTRL-Z redraws the screen.')
	READ(5,3,END=1) ANS
	CALL BOARD
	CALL DSTARS(NA,IA,1)
	POS(3)="40
	POS(3)="40
10	WRITE(5,11) POS,POS
11	FORMAT('+',4A1,8(25X/),X,4A1,' * PRACTICE MODE *')
	IF(ALPHA.EQ.'H') WRITE(5,100) M
	IF(ALPHA.EQ.'R') WRITE(5,101) M
	IF(ALPHA.GE.'a'.AND.ALPHA.LE.'z') WRITE(5,102) M,ALPHA
	ALPHA=' '
	WRITE(5,104)
104	FORMAT(' Enter ray entry point or'/
     C' neg. # to exit:'/'        '/'+-',x,$)
	READ(5,12,END=1,ERR=10) M
12	FORMAT(I2)
	IF(M.LT.0) GOTO 13
	J=0
	IF(M.GT.32.OR.M.EQ.0) GOTO 10
	CALL MOVE(M,J,ALPHA,IB)
	GOTO 10
100	FORMAT(X,I2,': HIT (ray absorbed)')
101	FORMAT(X,I2,': REFLECTION')
102	FORMAT(X,I2,': MISS/DEFLECTION (',A1,')')
13	CALL CLOSE(5)
	DO 200 I=1,10
	DO 200 J=1,10
	IF(IB(I,J).NE.'*') IB(I,J)=' '
200	CONTINUE
	RETURN
	END
