|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1980 Regents of the University of California. ! 3: * All rights reserved. ! 4: * ! 5: * Redistribution and use in source and binary forms are permitted ! 6: * provided that the above copyright notice and this paragraph are ! 7: * duplicated in all such forms and that any documentation, ! 8: * advertising materials, and other materials related to such ! 9: * distribution and use acknowledge that the software was developed ! 10: * by the University of California, Berkeley. The name of the ! 11: * University may not be used to endorse or promote products derived ! 12: * from this software without specific prior written permission. ! 13: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR ! 14: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED ! 15: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. ! 16: */ ! 17: ! 18: #ifndef lint ! 19: static char sccsid[] = "@(#)lose.c 5.4 (Berkeley) 6/18/88"; ! 20: #endif /* not lint */ ! 21: ! 22: # include "trek.h" ! 23: ! 24: /* ! 25: ** PRINT OUT LOSER MESSAGES ! 26: ** ! 27: ** The messages are printed out, the score is computed and ! 28: ** printed, and the game is restarted. Oh yeh, any special ! 29: ** actions which need be taken are taken. ! 30: */ ! 31: ! 32: char *Losemsg[] = ! 33: { ! 34: "You ran out of time", ! 35: "You ran out of energy", ! 36: "You have been destroyed", ! 37: "You ran into the negative energy barrier", ! 38: "You destroyed yourself by nova'ing that star", ! 39: "You have been caught in a supernova", ! 40: "You just suffocated in outer space", ! 41: "You could not be rematerialized", ! 42: "\n\032\014 ***\07 Ship's hull has imploded\07 ***", ! 43: "You have burned up in a star", ! 44: "Well, you destroyed yourself, but it didn't do any good", ! 45: "You have been captured by Klingons and mercilessly tortured", ! 46: "Your last crew member died", ! 47: }; ! 48: ! 49: lose(why) ! 50: int why; ! 51: { ! 52: Game.killed = 1; ! 53: sleep(1); ! 54: printf("\n%s\n", Losemsg[why - 1]); ! 55: switch (why) ! 56: { ! 57: ! 58: case L_NOTIME: ! 59: Game.killed = 0; ! 60: break; ! 61: } ! 62: Move.endgame = -1; ! 63: score(); ! 64: skiptonl(0); ! 65: reset(); ! 66: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.