Readme file for star_trek.cob.

GnuCOBOL version of ctrek.cob
=============================

There is also a *star_trek.COB* update posted here, by Micheal F. Gleason.
Simpler compile, `cobc -x star_trek.COB`.

Originally written in 1979 for COBOL on Multics, by Kurt Wilhelm.

It was ported to OpenCOBOL 1.1 by Harald Arnesen in 2010.

Brian Tiffin updated the code, a little, removing comp-5 to fix some
random number generator byte ordering issues and to add new build
instructions.  This code requires a special configuration setting of

    perform-osvs:yes

This allows for overlapping exit points when combining GO TO and paragraph
THRU performs. The code also requires -free or a

    text-width:132

setting, as it contains long source lines.

Michael F Gleason March 2022 updated the code a little more completing the 
conversion to free format and coding to remove the overlapping exit points.
Three command options were added to aid in testing the code. Testing is turned
on by logging in as either <mica> or <test>. A few small bugs were found and 
corrected.  New Tectonics:
   cobc -x star_trek.cob -t star_trek.lst

The objective
-------------
Star fleet is under attack from a Klingon invasion force.

Your job is too clear space around Federation HQ.

Captain's Orders
----------------
Commands include

- nav, Navigate. Prompts for direction and warp factor.
  Command can be shortened to navdw
  for example: nav13 for direction 1, warp speed 3.

- pha, Phasers.  Prompts for power level from 300 to 9999
  dependent on current fuel levels.

- tor, Torpedo.  Fires a photon torpedo.

- she, Shields.  Prompts for shield power level
  dependent on available fuel.

- doc, Dock.     Attempt to dock the ship at a nearby star base
  for refueling and repairs.

- com, Computer. Starts up the computer with six available functions.
  Command can be shortend to comc, for example com3.

  - 1, requests ship status report.
  - 2, requests a short range scan of current quadrant.
  - 3, requests a long range scan.  Quadrants are numbered by column,row.
  - 4, requests a Klingon tally.
  - 5, requests an intelligence report.
  - 6, to abandon ship.
  - invalid function code will ask if assistance is required
    answer "yes" for a list of computer functions.

- invalid commands with cause a prompt asking if assistance is required,
  answer "yes" for a list of valid commands. The program now accept <y> 
  for [yes]. Note that <no> is the default to all inputs requests.
  Commands may be shortened to single letter; n for vav, t for tor, s for sheilds...
  Long form commands may be supplemented with their numeric parameters;
  For example the com command could be com3 which will give a long range scan
  vs turning on the com computer then choosing option 3. command nav71 
  would navigate west at warp 1.

Navigation
----------
Directions are plotted with

    1
  8   2
7  -x-  3
  6   4
    5

Local space is a 9 by 9 grid of quadrants, numbered by column and then row.

Good luck, Captain.  Be wary the Romulans.
