home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 January
/
usenetsourcesnewsgroupsinfomagicjanuary1994.iso
/
sources
/
games
/
volume15
/
dinkum2
/
part05
/
opener.c
< prev
Wrap
C/C++ Source or Header
|
1993-01-27
|
27KB
|
952 lines
#define OPNR
#include "dink_sym.h"
#include "dink_glb.h"
void dialer(n)
/*****************************/
/* "dial" command" */
/* Version: Mk 1.1 */
/* 29 October 1989 */
/*****************************/
int n ;
{
/* deal with the question of "What is the combination?" */
if (tag[V_what]) {
printf("I really don't know. You might try looking around for a\n") ;
printf("series of numbers. Sometimes that can be a clue to the\n") ;
printf("actual combination.\n") ;
return ;
}
/* See if the combination was dialed in the right place */
if ((n == R_office_mang)&&
(room[R_office_mang][M_rm_status] >= S_revealed)) {
if (tag[V_0] && tag[V_49] && tag[V_67] && tag[V_82]) {
printf ("Click!! \n");
room[R_office_mang][M_rm_status] = S_dialed ;
return ;
}
printf ("You turned the dial but nothing happened. I think you \n");
printf ("dialed the wrong thing. \n");
return ;
}
printf ("How am I supposed to dial that? \n");
} /* --- end of the "dialer" subroutine --- */
void inventer()
/*****************************/
/* "inventory" command */
/* Version: Mk 1.0 */
/* 11 March 1989 */
/*****************************/
{
#if (PROTOTYPE)
void objector(int) ;
#endif
register int i;
int i_ws, j_ws ;
i_ws = 0 ;
j_ws = 0 ;
for (i = 0; i <= objcnt; i++) if (object[i][J_loc] == B_have) {
++j_ws;
i_ws = i ;
} ;
if ((j_ws == 0)&&(gleep_count == 0)) {
printf("You've got NOTHING!! \n") ;
return ;
}
if (j_ws >= 1) {
if (j_ws == 1) {
printf("You are carrying ") ;
objector(i_ws);
printf ("\n") ;
}
else {
printf ("You are carrying the following: \n");
for (i = 0; i <= objcnt; i++) {
if (object[i][J_loc] == B_have) {
printf (" ") ;
objector(i);
printf ("\n") ;
}
}
}
}
if (gleep_count > 0) {
if (gleep_count == 1) {
printf("You have one gleep.\n") ;
return ;
}
printf("You are carrying %d gleeps. \n",gleep_count) ;
}
} /* --- end of the "inventor" subroutine --- */
void drinker()
/*****************************/
/* "drink" command */
/* Version: Mk 1.0 */
/* 11 March 1989 */
/*****************************/
{
#if (PROTOTYPE)
void no_booze(void) ;
#endif
if (tag[V_can]) {
if (object[O_can][J_loc] == B_have) {
printf("The XXXX keeps on coming on ? \n") ;
printf("I think not, for there is no Fourex left for me to drink!\n") ;
}
else no_booze() ;
return ;
}
if (tag[V_bottle]) {
if (object[O_bottle][J_loc] == B_have) {
printf("Some greedy larrikin has drunk up all of the Black Swan! \n") ;
printf("Bad on Him! There is none left for me! \n") ;
return ;
}
no_booze() ;
return ;
}
if (tag[V_water]) {
printf("There is no water here that I am willing to drink.\n") ;
return ;
}
printf ("What exactly do you want me to drink? \n");
return;
} /* --- end of the "drinker" subroutine --- */
void no_booze()
/*****************************/
/* Version: Mk 1.0 */
/* 7 December 1992 */
/*****************************/
{
printf ("You don't have it in your possession to drink!\n");
return ;
} /* --- end of the "no_booze" subroutine --- */
void reader(n)
/*****************************/
/* "read" command */
/* Version: Mk 1.2 */
/* 23 December 1992 */
/*****************************/
int n ;
{
int k ;
#if (PROTOTYPE)
void rdtxt(int) ;
#endif
/* reject an isolated "read" command */
if (tag[V_VERB_ONLY]) {
printf ("What exactly do you want me to read? \n");
return;
}
for (;;) {
/* map from the manager's office */
if (tag[V_map]) {
k = O_map_frag ;
break;
}
/* Qadaffi's letter */
if (tag[V_letter]) {
k = O_letter ;
break ;
}
/* paper from the safe */
if (tag[V_paper]) {
k = O_paper ;
break;
}
/* Message on wall */
if ((tag[V_message] || tag[V_wall]) && (n == R_no_treasure)) {
k = O_message ;
rdtxt(k) ;
return ;
}
/* Deal with unreadable objects */
printf("There is no way in which I can read that. \n");
return ;
} /* end of the infinite for loop */
if (object[k][J_loc] == B_have) rdtxt(k) ;
else printf ("I can't read it because it isn't in my possession. \n");
} /* --- end of the subroutine "reader" --- */
void unlocker(n)
/*****************************/
/* "unlock" command */
/* Version: Mk 1.1 */
/* 16 September 1989 */
/*****************************/
int n ;
{
if (tag[V_VERB_ONLY]) {
printf ("What do you want me to unlock? \n");
return;
}
if (room[n][M_rm_type] == T_action_obj) {
switch (n) {
/* Managers office */
case R_office_mang:
if (tag[V_safe]) {
printf("This is a combination type safe (no key hole). You must\n");
printf("dial a combination in order to open this safe. \n");
}
else
printf("You're wasting your time. You can't unlock that! \n");
return;
/* office entrance */
case R_office_entr:
if (tag[V_door]) {
if (room[R_office_entr][M_rm_status] == S_open) {
printf("The door is already open! \n");
return;
}
if (room[R_office_entr][M_rm_status] == S_kicked) {
printf("The door has been kicked in! \n");
return;
}
if (room[R_office_entr][M_rm_status] == S_unlocked) {
printf("The door is already unlocked. However it is still closed! \n");
return;
}
/* The door has to still be unlocked */
if (tag[V_key]) {
if (object[O_key][J_loc] != B_have) {
printf("You don't have the key to this door in your possession! \n");
}
else {
printf("You turn the key in the lock and ") ;
printf("hear a satisfying \"click\".\n");
room[R_office_entr][M_rm_status] = S_unlocked ;
}
}
else printf ("With what shall I unlock the door? \n");
return;
}
default:
printf("I don't think that is the sort of thing one unlocks.\n") ;
} /* end of "unlock" room scan switch */
} /* end of "unmovable action device" block */
else printf("There is nothing here that can be unlocked! \n");
return ;
} /* --- end of the "unlocker" subroutine --- */
void closer(n)
/*****************************/
/* "close" command */
/* Version: Mk 1.0 */
/* 12 November 1988 */
/*****************************/
int n ;
{
/* scan "close" sentence */
if (room[n][M_rm_type] != T_action_obj) {
printf("There is nothing here that can be closed! \n");
return;
}
if (tag[V_VERB_ONLY]) {
printf ("What exactly do you want me to close? \n");
return;
}
switch (n) {
/* office door */
case R_office_entr:
if (!tag[V_door]) break ;
if (room[R_office_entr][M_rm_status] == S_kicked) {
printf("The door has been kicked in! It'll never be closed again.\n");
return;
}
if (room[R_office_entr][M_rm_status] == S_open) {
printf("The office door closes with a slam. \n");
room[R_office_entr][2] = R_wall ;
room[R_office_entr][M_rm_status] = S_closed ;
return ;
}
else printf("The office door is already closed! \n");
return ;
/* managers office */
case R_office_mang:
if ((!tag[V_picture])&&(!tag[V_safe])) break;
if (tag[V_safe]) {
if (room[R_office_mang][M_rm_status] < S_dialed)
printf("The safe is already closed. \n");
else {
printf("The safe door closes and locks with a \"click\". \n");
room[R_office_mang][M_rm_status] = S_revealed ;
}
}
if (tag[V_picture]) {
if (room[R_office_mang][M_rm_status] == S_closed)
printf("The platypus picture is already closed. \n");
else {
printf("The picture swings flush against the wall, hiding the safe.\n");
room[R_office_mang][M_rm_status] = S_closed ;
}
}
return ;
} /* end of the "close" switch */
printf ("I really don't see how one would close that? \n");
return;
} /* --- end of the "closer" subroutine --- */
void opener(n)
/*****************************/
/* "open" command */
/* Version: Mk 2.1 */
/* 25 April 1990 */
/*****************************/
int n ;
{
register int i ;
#if (PROTOTYPE)
void boom(void), ender(int), objector(int) ;
#endif
/* deal with a terse command */
if (tag[V_VERB_ONLY]) {
printf ("What exactly do you want me to open? \n");
return;
}
if (tag[V_can]) {
if (object[O_can][J_loc] == B_have)
printf("Some bugger has already drunk it up. The stubee is empty!\n");
else printf("You don't have a can to open! \n") ;
return;
}
if (tag[V_letter]) {
if (object[O_letter][J_loc] == B_have) {
boom() ; /* cause an explosion */
printf("It's not polite to read other people's mail!! As you lay\n") ;
printf("bleeding on the floor with your hands and arms blown away,\n") ;
printf("you realize that envelope actually contained a letter bomb!\n");
printf("(A trick widely used by terrorists in the 1970s). However\n");
printf("the knowledge does you little good since your spirit soon\n");
printf("departs this mortal coil.\n");
ender(F_died) ;
}
else printf("You don't have a letter to open!\n") ;
return ;
}
if (tag[V_bottle]) {
if (object[O_bottle][J_loc] == B_have)
printf("Some bugger has already drunk it up. The bottle is Empty! \n");
else printf("You don't have a bottle to open! \n") ;
return;
}
if (tag[V_umbrella]) {
if (object[O_umbrella][J_loc] == B_have) {
printf("You open the umbrella but find it's full of holes and\n");
printf("its clasp is broken. As soon as you release it, the\n");
printf("umbrella snaps shut.\n") ;
}
else printf("You don't have an umbrella to open! \n") ;
return;
}
/* Now check to see if the location is consistent with the command */
if (room[n][M_rm_type] != T_action_obj) {
printf ("I don't understand what you want me to open. \n") ;
return ;
}
switch (n) {
/* office entrance (door) */
case R_office_entr:
if (tag[V_door]) {
switch (room[R_office_entr][M_rm_status]) {
case S_kicked:
printf("The door has been kicked in! You don't need to open it.\n");
return;
case S_open:
printf("The door is already open! \n");
return ;
case S_unlocked:
printf("As you push open the office door, the rusty hinges creak \n");
printf("from long disuse. Darkness and stale air seem to exude \n");
printf("from the vacant office. The way is free for you to enter. \n");
room[R_office_entr][2] = R_office_hall ;
room[R_office_entr][M_rm_status] = S_open ;
return ;
case S_closed:
printf("The office door is locked tight.");
printf(" You need to unlock it with a key. \n");
return ;
} /* end of room status switch */
} /* end of the door "if" block */
break ;
/* managers office */
case R_office_mang:
if ((!tag[V_picture])&&(!tag[V_safe])) {
printf("I don't understand how I would open that.\n") ;
return ;
}
if (tag[V_picture]) {
switch (room[R_office_mang][M_rm_status]) {
case S_closed:
printf("You swing open the platypus picture revealing a large wall \n");
printf("safe with a combination dial. \n");
room[R_office_mang][M_rm_status] = S_revealed ;
break ;
default:
printf("The picture is already swung out. The problem is to open \n");
printf("the safe!! Hint: Dial in a combination. \n");
return ;
}
} /* end of the picture "if" block */
if (tag[V_safe]) {
switch (room[R_office_mang][M_rm_status]) {
case S_closed:
printf("I can see no safe in this office for me to open. Perhaps\n");
printf("there is a safe hidden in this office somewhere.\n");
return ;
case S_revealed:
printf("The safe is locked. You must first dial the combination\n");
printf("in order to open it. See if you can find the combination. \n");
return ;
case S_dialed:
printf("The safe door swings open smoothly and easily. \n");
room[R_office_mang][M_rm_status] = S_open ;
sw_active = TRUE ;
for (i=0; i <= objcnt; i++)
if (object[i][J_loc] == B_in_safe) {
printf ("Inside the safe, you see the following: \n");
for (i=0; i <= objcnt; i++) {
if (object[i][J_loc] == B_in_safe) {
printf (" ") ;
objector(i);
printf ("\n") ;
}
}
return ;
}
printf("---The safe is empty.--- \n");
return ;
case S_open:
printf("The safe is already open! \n");
return ;
} /* end of the "safe" status switch */
} /* end of the safe "if" block */
return ; /* this return statement must remain */
/* Lift door(s) */
case R_lift_entr:
if (tag[V_door]||tag[V_lift]) {
printf("It is not exactly clear how I would open these doors.\n") ;
printf("However I see a push button next to the lift doors.\n") ;
printf("Perhaps if I pressed the button something would happen.\n") ;
}
else printf("I'm confused about what I should open.\n");
return ;
} /* end of the "open" room switch */
printf ("I see nothing here that I can open. \n") ;
} /* --- end of the "opener" subroutine --- */
void boom()
{
printf("\n\n");
printf("BBBBBB OOOOO OOOOO MM MM !!!\n");
printf("B BB OO OO OO OO M M M M !!!\n");
printf("B BB OO OO OO OO M M M M !!!\n");
printf("BBBBBB OO OO OO OO M M M M !!!\n");
printf("B BB OO OO OO OO M MM M !!!\n");
printf("B BB OO OO OO OO M M\n");
printf("BBBBBB OOOOO OOOOO M M !!!\n\n");
} /* --- end of the "boom" subroutine --- */
void gleeper(n)
/********************************************/
/* */
/* Gleeper Subroutine */
/* */
/* Software by Gary A. Allen, Jr. */
/* Version: Mk 1.00 */
/* (c) Copyright 1989 by Gary A. Allen, Jr. */
/* */
/********************************************/
int n ;
{
register int i ;
int count ;
static int sw_glp_st = FALSE, cnt_down = 0 ;
/* Gleep display routine */
count = room[n][M_gleep] ;
if (((object[O_torch][J_loc] == B_have)&&object[O_torch][J_property])||
(n < 186)||(n > 202)) {
if (count != 0) {
sw_glp_st = TRUE ; /* gleeps can now multiply */
if (count != 1)
printf("There are %d gleeps here. \n",count) ;
else printf("There is a gleep here. \n") ;
return ;
}
}
/* Gleep reproduction routine */
if (sw_glp_st == TRUE) {
if (++cnt_down > 5) {
cnt_down = 0 ;
for (i = 0; i <= 9; i++) {
if (room[gleep_spot[i]][M_gleep] == 0) continue;
if (room[gleep_spot[i]][M_gleep] > 10000)
++room[gleep_spot[i]][M_gleep] ;
else room[gleep_spot[i]][M_gleep] <<= 1 ;
}
}
}
} /* --- end of "gleeper" subroutine --- */
void clip_in(ammo_flag)
/********************************************/
/* */
/* Clip_In Subroutine */
/* */
/* Software by Gary A. Allen, Jr. */
/* Version: Mk 2.00 */
/* (c) Copyright 1990 by Gary A. Allen, Jr. */
/* */
/********************************************/
int ammo_flag ;
{
/* ammo clip insertion routine */
if (object[O_rifle][J_loc] != B_have) {
printf("Galah!! You don't have a rifle to put an ammo clip into.\n");
return ;
}
if (clip_flag != F_no_clip) {
printf("There is already an ammo clip in the rifle. \n") ;
return ;
}
if (((object[O_clip][J_loc] != B_have)&&(ammo_flag == F_normal_clip))||
((object[O_org_clip][J_loc] != B_have)&&(ammo_flag == F_org_clip))) {
printf("You don't possess an ammo clip to put into the rifle.\n");
return ;
}
/* actually load the clip into the rifle */
object[O_rifle][J_type] = Z_alias ;
carry_count-- ;
carry_weight -= object[O_clip][J_weight] ;
if (ammo_flag == F_normal_clip) {
object[O_clip][J_loc] = B_unmade ;
clip_flag = F_normal_clip ;
object[O_rifle][J_property] = object[O_clip][J_property] ;
}
else {
object[O_org_clip][J_loc] = B_unmade ;
clip_flag = F_org_clip ;
object[O_rifle][J_property] = object[O_org_clip][J_property] ;
}
printf("The ammunition clip slides into the rifle with a \"click\".\n");
printf("You have %d bullets in the clip \n",
object[O_rifle][J_property]) ;
if (object[O_rifle][J_property] > 0)
printf("You cycle the M16's bolt once to chamber a round.\n");
return ;
} /* --- end of the "clip_in" subroutine --- */
void clip_out(n)
/********************************************/
/* */
/* Clip_Out Subroutine */
/* */
/* Software by Gary A. Allen, Jr. */
/* Version: Mk 1.00 */
/* (c) Copyright 1989 by Gary A. Allen, Jr. */
/* */
/********************************************/
int n ;
{
int ammo_flag ;
/* remove clip from rifle */
if (object[O_rifle][J_loc] != B_have) {
printf("You Bloody Galah! ") ;
printf("You don't have a rifle in your possession!\n");
return ;
}
if (clip_flag == F_no_clip) {
printf("There is no clip in the rifle. \n") ;
return ;
}
/* eject the clip from the rifle */
object[O_rifle][J_type] = Z_normal ;
if (clip_flag == F_normal_clip) {
object[O_clip][J_loc] = n ;
ammo_flag = F_normal_clip ;
}
else {
object[O_org_clip][J_loc] = n ;
ammo_flag = F_org_clip ;
}
++room[n][M_obj_cnt] ;
clip_flag = F_no_clip ;
printf("You press the \"eject\" button on the rifle and the ") ;
printf("magazine falls to the ground.\n") ;
if (object[O_rifle][J_property] > 0) {
printf("You then cycle the M16's bolt once to clear the chamber. ");
printf("The unfired round\n") ;
printf("is ejected from the breech and rolls out of sight. \n") ;
if (ammo_flag == F_normal_clip)
object[O_clip][J_property] =
--object[O_rifle][J_property] ;
else object[O_org_clip][J_property] =
--object[O_rifle][J_property] ;
object[O_rifle][J_property] = 0 ;
}
return ;
} /* --- end of the "clip_out" subroutine --- */
void igniter(n)
/********************************************/
/* */
/* Igniter Subroutine */
/* */
/* Software by Gary A. Allen, Jr. */
/* Version: Mk 1.00 */
/* (c) Copyright 1989 by Gary A. Allen, Jr. */
/* */
/********************************************/
int n ;
{
#if (PROTOTYPE)
void switcher(int) ;
long time(int) ;
#endif
/* reject single verb command */
if (tag[V_VERB_ONLY]) {
printf("What exactly do you want me to set alight?\n") ;
return ;
}
/* deal with 'light torch' command */
if (tag[V_torch]) {
switcher(n) ;
return ;
}
/* see if the player has or requested matches */
if (!tag[V_match]) {
printf("What am I to light it with?\n") ;
printf("(I am not prepared to rub two sticks together.)\n") ;
return ;
}
if (object[O_matches][J_loc] != B_have) {
printf("I have no matches!\n") ;
return ;
}
else {
/* reject spurious "ignite" command */
if ((!tag[V_cap])&&(!tag[V_dynamite])&&
(sent[2] != V_LINE_END)) {
printf("It would be a fire hazard to set that alight.\n");
return ;
}
/* deal with spurious "light dynamite with match" */
if (tag[V_dynamite]&&(object[O_dynamite][J_loc] != B_have)) {
printf("You have no dynamite to ignite.\n") ;
return ;
}
/* deal with spurious "light cap with match" */
if (tag[V_cap]&&(object[O_dynamite][J_loc] != B_have)&&
(object[O_cap][J_loc] != B_have)) {
printf("You don't have one to ignite.\n") ;
return ;
}
/* light up the match(es) */
if (tag[V_PLURAL]) {
printf("You open up the match box and strike ALL of the matches.\n");
object[O_matches][J_loc] = B_destroyed ;
}
else {
printf("You take one match from the match box and ignite it.\n") ;
}
}
/* see if player selected burnable objects */
if (tag[V_cap]&&(object[O_cap][J_loc] == B_have)) {
printf("You then ignite the fuse of the blasting cap.\n\n");
printf("Ssssssssssssssssssssssss........\n");
clock_explode = time(0) + 11 ;
sw_clock = TRUE ;
flag_clock = V_cap ;
return ;
}
if ((tag[V_cap]||tag[V_dynamite])&&
(object[O_dynamite][J_loc] == B_have)) {
if (object[O_dynamite][J_type] == Z_alias) {
printf("You then ignite the fuse of the dynamite's blasting cap....\n");
printf("You need to very quickly get very far away from this thing!!");
printf("\n\nSsssssssssssssssssssssss........\n");
clock_explode = time(0) + 11 ;
sw_clock = TRUE ;
flag_clock = V_dynamite ;
return ;
}
else {
printf("You then ignite the dynamite. Which is an odd thing\n");
printf("to do since it doesn't have a blasting cap in it. The\n");
printf
("\"dynamite\" (which is actually a very safe mining explosive)\n");
printf("burns for a few minutes, billowing out smelly black smoke\n");
printf("and eventually goes out leaving a few scant ashes behind.\n") ;
object[O_dynamite][J_loc] = B_destroyed ;
return ;
}
}
} /* -- end of the "igniter" subroutine --- */
void hold_it()
/********************************************/
/* */
/* Wait Subroutine */
/* */
/* Software by Gary A. Allen, Jr. */
/* Version: Mk 1.00 */
/* (c) Copyright 1989 by Gary A. Allen, Jr. */
/* */
/********************************************/
{
#if (PROTOTYPE)
char getch(void) ;
#endif
#ifdef __TURBOC__
/* Stop scrolling the screen until the user is ready */
printf(" [Press any key to continue]\r") ;
getch() ;
printf(" \n") ;
#endif
#ifndef __TURBOC__
printf(" [Press RETURN to continue]\n") ;
getchar() ;
#endif
} /* --- end of the "hold_it" subroutine --- */
void eater()
/********************************************/
/* */
/* Eater Subroutine */
/* */
/* Software by Gary A. Allen, Jr. */
/* Version: Mk 1.00 */
/* (c) Copyright 1989 by Gary A. Allen, Jr. */
/* */
/********************************************/
{
#if (PROTOTYPE)
void ender(int) ;
#endif
/* reject single verb command */
if (tag[V_VERB_ONLY]) {
printf("What exactly do you want me to swallow?\n") ;
return ;
}
/* deal with "eat (atropine) pill(s)" command */
if (tag[V_pill]) {
if (object[O_pills][J_loc] != B_have) {
printf("You don't have the atropine pills in your possesion!\n") ;
return ;
}
if (tag[V_PLURAL]) {
printf("You remove ALL of the pills from the packet and swallow\n");
printf("the lot. For a couple of minutes nothing happens, then you\n");
printf("start seeing double and have nervous twitches. You then\n");
printf("start shaking violently and collapse to the ground.\n") ;
printf("Eventually you pass out and expire from atropine poisoning.\n");
ender(F_died) ;
}
if (--pill_count <= 0 ) {
object[O_pills][J_loc] = B_destroyed ;
carry_count-- ;
carry_weight -= object[O_pills][J_weight] ;
printf("You swallow the last atropine pill and throw away the empty\n");
printf("packet which disappears from sight. ") ;
}
else printf("You swallow one atropine pill. ") ;
i_poison += 10 ;
if (i_poison >= 30) {
printf("\nAfter a moment you have a violent seizure and die.\n") ;
ender(F_died) ;
}
if (i_poison >= 20) {
printf("\nYou begin to shake violently and can barely stand.\n") ;
return ;
}
if (i_poison >= 15) {
printf("\nYour hands become a bit jittery and your vision blurred.\n") ;
return ;
}
printf("The drug has no ill effect.\n") ;
return ;
}
else
printf("I am not inclined towards putting that into my mouth!\n") ;
} /* --- end of the "eater" subroutine --- */
void ender(i_quit)
/********************************************/
/* */
/* Ender Subroutine */
/* */
/* Software by Gary A. Allen, Jr. */
/* Version: Mk 1.00 */
/* (c) Copyright 1989 by Gary A. Allen, Jr. */
/* */
/********************************************/
int i_quit ;
{
#if (PROTOTYPE)
void hold_it(void), new_score(void), exit(int) ;
#endif
/* get last score */
new_score() ;
if (gleep_score != 0) sw_active = TRUE ;
if (i_quit == F_died) {
hold_it() ;
score -= 100 ;
printf ("\nOh Dear! You've just turned yourself into a corpse! \n\n");
printf ("For getting killed you lose 100 points. \n\n") ;
}
/* Scoring Block */
for(;;) {
if (!sw_active) {
if (score == 0) {
printf("You concluded the game with no points. ") ;
printf("What a pitiful performance!!\n") ;
}
else {
printf("You concluded the game with a miserable negative score\n") ;
printf("of %d points. Your score was better BEFORE you \n",score);
printf("started playing (need I say more on how this reflects\n");
printf("upon your limited aptitude at Dinkum).\n") ;
}
break ; /* drop out of the scoring block */
}
if (score == 0) {
printf("You concluded the game with no points ") ;
if (gleep_score == 0) {
printf("and didn't drop a single gleep\n") ;
printf("into the gleep tank. The word \"embarrassing\" sums it up!\n") ;
}
else {
if (gleep_score > 1) {
printf("but you did put %d gleeps\n",gleep_score) ;
printf("into the gleep tank.\n") ;
}
else {
printf("but you did manage to find a gleep\n") ;
printf("and put it in the gleep tank, (Hah!! What an achievement!).\n");
}
}
}
else {
if (score > 0)
printf ("You concluded the game with %d points",score);
else {
printf("You concluded the game with a miserable negative score\n") ;
printf("of %d points. Your score was better BEFORE you \n",score);
printf("started playing (need I say more on how this reflects\n");
printf("upon your limited aptitude at Dinkum). You ") ;
if (gleep_score == 0) {
printf("also failed to\nget any gleeps into the tank. At least ");
printf("you're consistent.\n\n") ;
}
else {
printf("managed\nto get something into the gleep tank. However ");
printf("it hardly\nmatters, considering your poor score.\n\n") ;
}
break ; /* drop out of the scoring block */
}
if (gleep_score == 0)
printf(".\nHowever you placed no gleeps in the gleep tank.\n") ;
else {
if (gleep_score > 1) {
printf (" and placed %d gleeps\n",gleep_score) ;
printf ("in the gleep tank. Good on you, Mate!\n") ;
}
else {
printf(" but you did manage to find a gleep\n") ;
printf("and put it in the gleep tank.\n") ;
}
}
}
break ; /* drop out of the scoring block */
} /* end of the scoring block */
/* Closing Remark */
printf("\nDinkum has ended. If you are interested in more ") ;
printf("information\nabout this program type: dinkum -h\n") ;
exit(0);
} /* --- end of "ender" routine --- */