      SUBROUTINE SCORE
C*BEGIN COMMON 
      COMMON SNAP,SNAPSHT(247), 
     +   DATE,REMKL,REMCOM,REMBASE,REMRES,REMTIME,STARKL,BASEKL,
     +   KILLK,KILLC,GALAXY(8,8),CX(10),CY(10),BASEQX(5),BASEQY(5), 
     +   NEWSTUF(8,8),PLNETS(10,5),ISX,ISY,NSCREM,NROMKL,NROMREM,
     +   NSCKILL,NPLANKL,ISATB,BATX,BATY,THINGX,THINGY,
     +   QUAD(10,10),KX(20),KY(20),KPOWER(20),KDIST(20),KSTUF(20),  
     +   FUTURE(10),MESSAGE(5,10),
     +   INKLING,INBASE,INRESOR,INCOM,INTIME,INSTAR,INENRG,INSHLD,
     +   INTORPS,INLSR,INDATE,ENERGY,SHLD,SHLDUP,CONDIT,TORPS,SHIP, 
     +   QUADX,QUADY,SECTX,SECTY,WARPFAC,WFACSQ,LSUPRES,DAMAGE(20), 
     +   LENGTH,SKILL,PASSWD,DIST,DIREC,TIME,BASEX,BASEY,DOCKFAC, 
     +   KLHERE,COMHERE,CASUAL,NHELP,NKINKS,STARCH(8,8),
     +   DEVICE(2,14),IDIDIT,GAMEWON,ALIVE,JUSTIN,RESTING,ALLDONE,
     +   DAMFAC,SHLDCHG,NDEVICE,PLNETX,PLNETY,INORBIT,LANDED,IPLANET,
     +   IMINE,ICRYSTL,INPLAN,NENHERE,ISHERE,NEUTZ,IRHERE,ICRAFT,
     +   IENTESC,ISCRAFT,ISCATE,CRYPROB,ICITE,IPHWHO,
     +   CRACKS(12) 
      INTEGER SHLDUP,CONDIT,QUADX,QUADY,SECTX,SECTY,TORPS,
     +   REMKL,REMBASE,SKILL,REMCOM,GALAXY,STARCH,CX,CY, 
     +   SHIP,ALLDONE,BASEQX,BASEQY,BASEX,BASEY,GAMEWON, 
     +   ALIVE,STARKL,BASEKL,CASUAL,COMHERE,RESTING,SNAP,SHLDCHG, 
     +   THINGX,THINGY,BATX,BATY,PLNETX,PLNETY,PLNETS
      REAL KDIST,KPOWER,LSUPRES,INTIME,INRESOR,INDATE,INSHLD,   
     +   INENRG,INLSR 
	BYTE QUAD
	REAL*8 DEVICE,PASSWD
C*END COMMON 
	LOGICAL*1 IHS,IHR,IHC,IHK,IHE,IHF,IHBLANK,IHDOT,IHP,IHB
	1 ,IHSTAR,IHT,IHQUEST,IHNUM,ISHIP
      COMMON/HOLLER/IHEOL,IHREAL,IHALPHA,IHS,IHR,IHC,IHK,IHGREEN,IHRED, 
     +IHYELLO,IHDOCKD,IHE,IHF,IHBLANK,IHDOT,IHQUEST,IHP,IHSTAR,IHB
     +,IHT,IHNUM  
      COMMON/PLAQ/ISCORE,PERDATE,ISKILL 
	COMMON/PRLUN/LUN
	DATA LPNAME /3RLP /
	EQUIVALENCE (ISHIP,SHIP)
	CALL PROMPT(43HDO YOU WANT YOUR SCORE PRINTED ON THE LP:? ,43)
	IF(JA(DUMMY).EQ.0) GO TO 1
	LUN=6
	CALL IASIGN(6,LPNAME)
1	ISKILL=SKILL
      TIMUSED=DATE-INDATE 
      IF(TIMUSED.EQ.0 .OR. REMKL.NE.0) TIMUSED=AMAX1(TIMUSED,5.0) 
      PERDATE=(KILLC+KILLK+NSCKILL)/TIMUSED 
      ITHPERD=500.0*PERDATE+0.5 
      IWON=0
      IF(GAMEWON .NE. 0) IWON=100.0*SKILL 
      IF(ISHIP .EQ. IHE) KLSHIP=0
      IF(ISHIP .EQ. IHF) KLSHIP=1
      IF(ISHIP .EQ. 0)   KLSHIP=2
      IDIED=0 
      IF(ALIVE .EQ. 0) IDIED=200
      IF(GAMEWON .EQ. 0) NROMREM=0
      ISCORE = 10*KILLK + 50*KILLC + ITHPERD + IWON - IDIED 
     C  -100*BASEKL -100*KLSHIP -45*NHELP -5*STARKL -CASUAL 
     C +20*NROMKL+200*NSCKILL-10*NPLANKL+NROMREM
      CALL SKIP(1)
      CALL PROUT(12HYOUR SCORE--,12) 
      CALL SKIP(1)
      IF(NROMKL .EQ. 0) GO TO 3 
      CALL CRAMI(NROMKL,6)
      CALL CRAM(35H ROMULANS DESTROYED                           )
	CALL CRAMI(20*NROMKL,10)
	CALL CREND
 3    IF(NROMREM .EQ. 0) GO TO 5
      CALL CRAMI(NROMREM,6) 
      CALL CRAM(35H ROMULANS CAPTURED                                 ) 
	CALL CRAMI(NROMREM,10)
	CALL CREND
 5    IF(KILLK .EQ. 0) GO TO 10 
      CALL CRAMI(KILLK,6) 
      CALL CRAM(35H ORDINARY KLINGONS DESTROYED       ) 
      CALL CRAMI(10*KILLK,10) 
      CALL CREND
 10   IF(KILLC .EQ. 0) GO TO 12 
      CALL CRAMI(KILLC,6) 
      CALL CRAM(35H KLINGON COMMANDERS DESTROYED      ) 
      CALL CRAMI(50*KILLC,10) 
      CALL CREND
 12   IF(NSCKILL .EQ. 0) GO TO 15 
      CALL CRAMI(NSCKILL,6) 
      CALL CRAM(35H SUPER-COMMANDER DESTROYED            )
      CALL CRAMI(200,10)
      CALL CREND
 15   IF(ITHPERD .EQ. 0) GO TO 20 
      CALL CRAMF(PERDATE,6,2) 
      CALL CRAM(35H KLINGONS PER STARDATE, AVERAGE    ) 
      CALL CRAMI(ITHPERD,10)
      CALL CREND
 20   IF(STARKL .EQ. 0) GO TO 30
      CALL CRAMI(STARKL,6)
      CALL CRAM(35H STARS DESTROYED BY YOUR ACTION    ) 
      CALL CRAMI(-5*STARKL,10)
      CALL CREND
30	IF(NPLANKL.EQ.0) GO TO 32
	CALL CRAMI(NPLANKL,6)
      CALL CRAM(35H PLANETS DESTROYED BY YOUR ACTION       )
      CALL CRAMI(-10*NPLANKL,10) 
	CALL CREND
 32   IF(BASEKL .EQ. 0) GO TO 35
      CALL CRAMI(BASEKL,6)
      CALL CRAM(35H BASES DESTROYED BY YOUR ACTION    ) 
      CALL CRAMI(-100*BASEKL,10)
      CALL CREND
 35   IF(NHELP .EQ. 0) GO TO 40 
      CALL CRAMI(NHELP,6) 
      CALL CRAM(35H CALLS FOR HELP FROM STARBASE      ) 
      CALL CRAMI( -45*NHELP,10) 
      CALL CREND
 40   IF(CASUAL .EQ. 0) GO TO 45
      CALL CRAMI(CASUAL,6)
      CALL CRAM(35H CASUALTIES INCURRED               ) 
      CALL CRAMI(-CASUAL,10)
      CALL CREND
 45   IF(KLSHIP .EQ. 0) GOTO 50 
      CALL CRAMI(KLSHIP,6)
      CALL CRAM(35H SHIP(S) LOST OR DESTROYED         ) 
      CALL CRAMI(-100*KLSHIP,10)
      CALL CREND
 50   IF(ALIVE .NE. 0) GO TO 60 
      CALL PROUT( 
     +   50HPENALTY FOR GETTING YOURSELF KILLED           -200,50)
 60   IF(GAMEWON .EQ. 0) GO TO 70 
      CALL CRAM(18HBONUS FOR WINNING )
      IF(SKILL .EQ. 1) CALL CRAM(13HNOVICE GAME  ) 
      IF(SKILL .EQ. 2) CALL CRAM(13HFAIR GAME    )
      IF(SKILL .EQ. 3) CALL CRAM(13HGOOD GAME    ) 
      IF(SKILL .EQ. 4) CALL CRAM(13HEXPERT GAME  )
      IF(SKILL .EQ. 5) CALL CRAM(13HEMERITUS GAME)
      CALL CRAM(10H            )
      CALL CRAMI(IWON,10) 
      CALL CREND
 70   CALL PROUT(0,1) 
      CALL CRAM(41HTOTAL SCORE                              ) 
      CALL CRAMI(ISCORE,10) 
      CALL CREND
	IF(LUN .EQ. 6) CALL CLOSE (6)
	LUN=7
      RETURN
      END 
