BSD 4_3_Reno release
[unix-history] / usr / src / games / trek / ram.c
index eff61bd..d21a161 100644 (file)
@@ -1,6 +1,25 @@
+/*
+ * Copyright (c) 1980 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted provided
+ * that: (1) source distributions retain this entire copyright notice and
+ * comment, and (2) distributions including binaries display the following
+ * acknowledgement:  ``This product includes software developed by the
+ * University of California, Berkeley and its contributors'' in the
+ * documentation or other materials provided with the distribution and in
+ * all advertising materials mentioning features or use of this software.
+ * Neither the name of the University nor the names of its contributors may
+ * 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
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)ram.c      4.1     (Berkeley)      %G%";
-#endif not lint
+static char sccsid[] = "@(#)ram.c      5.5 (Berkeley) 6/1/90";
+#endif /* not lint */
 
 # include      "trek.h"
 
 
 # include      "trek.h"
 
@@ -21,7 +40,7 @@ int   ix, iy;
        register int            i;
        register char           c;
 
        register int            i;
        register char           c;
 
-       printf("\aRED ALERT\a: collision imminent\n");
+       printf("\07RED ALERT\07: collision imminent\n");
        c = Sect[ix][iy];
        switch (c)
        {
        c = Sect[ix][iy];
        switch (c)
        {
@@ -43,7 +62,7 @@ int   ix, iy;
                killb(Ship.quadx, Ship.quady);
                /* don't penalize the captain if it wasn't his fault */
                if (!damaged(SINS))
                killb(Ship.quadx, Ship.quady);
                /* don't penalize the captain if it wasn't his fault */
                if (!damaged(SINS))
-                       Game.killb =+ 1;
+                       Game.killb += 1;
                break;
        }
        sleep(2);
                break;
        }
        sleep(2);
@@ -51,8 +70,8 @@ int   ix, iy;
 
        /* select the number of deaths to occur */
        i = 10 + ranf(20 * Game.skill);
 
        /* select the number of deaths to occur */
        i = 10 + ranf(20 * Game.skill);
-       Game.deaths =+ i;
-       Ship.crew =- i;
+       Game.deaths += i;
+       Ship.crew -= i;
        printf("McCoy: Take it easy Jim; we had %d casualties.\n", i);
 
        /* damage devices with an 80% probability */
        printf("McCoy: Take it easy Jim; we had %d casualties.\n", i);
 
        /* damage devices with an 80% probability */