	SUBROUTINE TINIT(ISEQ)
C	ROUTINE TO:      (TINIT--TURN INITIALIZING)
C	CHECK FOR END OF GAME
C	SEQUENCE PLAYERS FOR EACH TURN
C	INCREMENT TURN COUNTER
C	UPDATE ENERGY LEVELS IN CUBE
C 
C----------------------standard common block----------------------------
C 
	COMMON ICR(8,12),IPARM(10),IS1,IS2,NT,ICU(10,10,10,2),CLEAR(8)
	COMMON MARKER(4,3,3)
	LOGICAL*1 ICU,CLEAR
C 
C-----------------------------------------------------------------------
	LOGICAL*1 ANS
	DIMENSION ISEQ(8)
C 
C	INCREMENT TURN COUNTER:
	NT=NT+1
C 
C 
C	CHECK FOR ENDGAME:
	NP=0
	NC=0
	DO 80 I=1,8
	IF(ICR(I,1).NE.1.AND.ICR(I,1).NE.2) GOTO 79
	ID=I  ! SAVE PLAYER ID
	NP=NP+1
79	IF(ICR(I,1).GT.2) NC=NC+1
80	CONTINUE
	J=1  ! ASSUME PLAYER WON
	IF(NP.GT.1) GOTO 81 ! MORE THAN ONE PLAYER LEFT; KEEP RUNNING
	IF(NC.GT.0.AND.NP.GT.0) GOTO 81 ! ONE PLAYER + CRAWLERS
	IF(NP.EQ.0) J=0 ! NO PLAYERS LEFT, CUBE WON
	IF(J.EQ.1) WRITE(ICR(ID,8),82) "33,"33,CLEAR(ID)
	IF(J.EQ.1) WRITE(ICR(ID,8),83) ID
	IF(J.EQ.1) WRITE(ICR(ID,8),84)
	WRITE(5,82) "33,"33,CLEAR(8)
	IF(J.EQ.1) WRITE(5,83) ID
	IF(J.EQ.0) WRITE(5,85)
	WRITE(5,84)
82	FORMAT(X,A1,'Y  ',2A1//////
     C2(/T25'****************************')
     C2(/T25'***                      ***'))
83	FORMAT(T25'***   C R A W L E R   ',I1,'  ***')
85	FORMAT(T25'***    T H E   C U B E   ***')
84	FORMAT(T25'***                      ***'/
     CT25'***    H A S   W O N !   ***'/
     C2(T25'***                      ***'/)
     C2(T25'****************************'/)//)
C	SET FLAG FOR MAIN (END OF GAME)
	ISEQ(1)=-1
	GOTO 999
C 
C	UPDATE CUBE ENERGY LEVELS
C	ALTHOUGH ICU IS LOGICAL*1, VALUES FROM "0 TO "277 CAN BE STORED
C	IN IT.  PROGRAM TREATS THEM AS INTEGERS IN RANGE 0 TO 8.
81	DO 8 I=1,10
	DO 8 J=1,10
	DO 8 K=1,10   ! INCREMENT CUBE ENERGY
	ICU(I,J,K,2)=ICU(I,J,K,2)+1
	IF(ICU(I,J,K,2).GT.IPARM(6)) ICU(I,J,K,2)=IPARM(6)
	ANS=ICU(I,J,K,1)
	IF(ANS.EQ.'[') ICU(I,J,K,2)=20  ! DOORWAYS GET 20
	IF(ANS.GT.'9'.AND.ANS.LT.'C'.AND.ICU(I,J,K,2).GE.8)
     CICU(I,J,K,2)=20
C	(CRAWLER ON DOOR.  MUST WAIT 8 TURNS BEFORE ENERGY UPS TO 20)
8	CONTINUE
C 
C	SELECT PLAYER SEQUENCE
	NEXT=0
259	NEXT=NEXT+1
	ISEQ(NEXT)=0
260	N=RAN(IS1,IS2)*7.999+1.
	DO 261 I=1,NEXT
	IF(ISEQ(I).EQ.N) GOTO 260
261	CONTINUE
	ISEQ(NEXT)=N
	IF(NEXT.LT.8) GOTO 259
999	RETURN
	END
