Berkeley copyright
[unix-history] / usr / src / games / trek / nova.c
index 762ee72..d5bb435 100644 (file)
@@ -1,6 +1,23 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)nova.c     4.1     (Berkeley)      %G%";
-#endif not lint
+static char sccsid[] = "@(#)nova.c     5.3 (Berkeley) %G%";
+#endif /* not lint */
 
 # include      "trek.h"
 
 
 # include      "trek.h"
 
@@ -40,10 +57,10 @@ int x, y;
        else
        {
                Sect[x][y] = HOLE;
        else
        {
                Sect[x][y] = HOLE;
-               Quad[Ship.quadx][Ship.quady].holes =+ 1;
+               Quad[Ship.quadx][Ship.quady].holes += 1;
        }
        }
-       Quad[Ship.quadx][Ship.quady].stars =- 1;
-       Game.kills =+ 1;
+       Quad[Ship.quadx][Ship.quady].stars -= 1;
+       Game.kills += 1;
        for (i = x - 1; i <= x + 1; i++)
        {
                if (i < 0 || i >= NSECTS)
        for (i = x - 1; i <= x + 1; i++)
        {
                if (i < 0 || i >= NSECTS)
@@ -74,7 +91,7 @@ int   x, y;
 
                          case BASE:
                                killb(i, j);
 
                          case BASE:
                                killb(i, j);
-                               Game.killb =+ 1;
+                               Game.killb += 1;
                                break;
 
                          case ENTERPRISE:
                                break;
 
                          case ENTERPRISE:
@@ -83,15 +100,15 @@ int        x, y;
                                if (Ship.shldup)
                                        if (Ship.shield >= se)
                                        {
                                if (Ship.shldup)
                                        if (Ship.shield >= se)
                                        {
-                                               Ship.shield =- se;
+                                               Ship.shield -= se;
                                                se = 0;
                                        }
                                        else
                                        {
                                                se = 0;
                                        }
                                        else
                                        {
-                                               se =- Ship.shield;
+                                               se -= Ship.shield;
                                                Ship.shield = 0;
                                        }
                                                Ship.shield = 0;
                                        }
-                               Ship.energy =- se;
+                               Ship.energy -= se;
                                if (Ship.energy <= 0)
                                        lose(L_SUICID);
                                break;
                                if (Ship.energy <= 0)
                                        lose(L_SUICID);
                                break;