Tuesday, May 22, 2007

Star Trek

Introduction

Star Trek is a classic computer game written by Mike Mayfield, 20 October 1972. The game is based on the Star Trek television show. This program is a direct port to Java from the original BASIC program, and does not use object-oriented programming (OOP).

                                 * * *   Star Trek   * * *

Do you want instructions (they're long!): no

You must destroy 13 Klingons in 30 stardates with 2 starbases.

Combat Area      Condition Red
   Shields dangerously low

Short Range Sensor Scan

   1   2   3   4   5   6   7   8
 ---------------------------------
1              *
2                                  Stardate:            2486
3              *       *           Condition:           Red
4 +++  *       *                   Quadrant:            2, 6
5     <*>                          Sector:              5, 2
6                                  Energy:              3000.0
7                  *               Photon Torpedoes:    10
8                                  Shields:             0.0
 ---------------------------------

Command:

Download the Star Trek Java port

How to compile the Star Trek Java port

Write the following in a Linux terminal window or MS-DOS window:

javac StarTrek.java

How to run the Star Trek Java port

Write the following in a Linux terminal window or MS-DOS window:

java StarTrek

References

The original Star Trek BASIC program can be found here:

Resources

1 comment:

Anonymous said...

i cant figure out how to use the code. your instructions didnt work for me.is there some kind of video?