In /usr/src/games/trek

When computer calculates warpcost, labels are incorrectly transposed for
"stardates" and "cost". This is affirmed by the fact that time should go
down as warp speed goes up, and energy consumed should also go up with
warp speed. Additionally, the cost of "w/ shlds up" doubles the value
of energy consumed, not time taken to travel.

Also, fixed spelling issue in trek.h "galaxy" instead of "galazy".


Index: computer.c
===================================================================
RCS file: /cvs/src/games/trek/computer.c,v
retrieving revision 1.9
diff -u -r1.9 computer.c
--- computer.c  27 Oct 2009 23:59:27 -0000      1.9
+++ computer.c  1 Jun 2013 21:16:01 -0000
@@ -238,7 +238,7 @@
                                warpfact = Ship.warp;
                        cost = (dist + 0.05) * warpfact * warpfact * warpfact;
                        time = Param.warptime * dist / (warpfact * warpfact);
-                       printf("Warp %.2f distance %.2f cost %.2f
stardates %d (%d w/ shlds up) units\n",
+                       printf("Warp %.2f distance %.2f stardates %.2f
cost %d (%d w/ shlds up) units\n",
                                warpfact, dist, time, cost, cost + cost);
                        break;

Index: trek.h
===================================================================
RCS file: /cvs/src/games/trek/trek.h,v
retrieving revision 1.11
diff -u -r1.11 trek.h
--- trek.h      30 Apr 2010 19:29:01 -0000      1.11
+++ trek.h      1 Jun 2013 21:16:01 -0000
@@ -56,7 +56,7 @@

 /* galactic parameters */
 #define        NSECTS          10      /* dimensions of quadrant in sectors */
-#define        NQUADS          8       /* dimension of galazy in quadrants */
+#define        NQUADS          8       /* dimension of galaxy in quadrants */
 #define        NINHAB          32      /* number of quadrants which
are inhabited */

 struct quad            /* definition for each quadrant */

Reply via email to