home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Devil's Doorknob BBS Capture (1996-2003)
/
devilsdoorknobbbscapture1996-2003.iso
/
W
/
BTIMPY.ZIP
/
TEST2.C
< prev
next >
Wrap
C/C++ Source or Header
|
1992-09-06
|
3KB
|
184 lines
#include <stdio.h>
#include <string.h>
#include <io.h>
#include <fcntl.h>
#include <test.h>
void hallone();
void masbed();
void masbath();
void secroom();
void halltwo();
void smallbed();
void hallone()
{
printf("
\n\nYou are in the upstairs hallway.\n");
printf("Command? ");
cho=upcase(getche());
command();
switch(cho) {
case 'N':
halltwo();
case 'S':
landing();
case 'E':
masbed();
case 'W':
nogo();
hallone();
case '?':
help();
hallone();
case 'Q':
quit();
default:
hallone();
}
}
void masbed()
{
printf("
\n\nYou are in the master bedroom.\n");
printf("Command? ");
cho=upcase(getche());
command();
switch(cho) {
case 'N':
nogo();
masbed();
case 'S':
nogo();
masbed();
case 'E':
masbath();
case 'W':
hallone();
case '?':
help();
masbed();
case 'Q':
quit();
default:
masbed();
}
}
void masbath()
{
printf("
\n\nYou are in the bathroom.\n");
printf("Command? ");
cho=upcase(getche());
command();
switch(cho) {
case 'N':
printf("
\nYou try to turn to go North but you trip on a loose floor board and");
printf("\nfall against the wall. Apparently you have found a secret switch and");
printf("\na panel in the wall slides back revealing a secret passage.");
printf("\nDo you want to enter? ");
cho=upcase(getche());
if (cho=='Y')
secroom();
printf("\nOk maybe next time.");
masbath();
case 'S':
nogo();
masbath();
case 'E':
nogo();
masbath();
case 'W':
masbed();
case '?':
help();
masbath();
case 'Q':
quit();
default:
masbath();
}
}
void secroom()
{
printf("
\n\nYou are in the secret room.\n");
printf("Command? ");
cho=upcase(getche());
command();
switch(cho) {
case 'N':
nogo();
secroom();
case 'S':
masbath();
case 'E':
nogo();
secroom();
case 'W':
nogo();
secroom();
case '?':
help();
secroom();
case 'Q':
quit();
default:
secroom();
}
}
void halltwo()
{
printf("
\n\nYou are now in the North Hall.\n");
printf("Command? ");
cho=upcase(getche());
command();
switch(cho) {
case 'N':
nogo();
halltwo();
case 'S':
hallone();
case 'E':
smallbed();
case 'W':
nogo();
halltwo();
case '?':
help();
halltwo();
case 'Q':
quit();
default:
halltwo();
}
}
void smallbed()
{
printf("
\n\nYou are in a small bedroom.\n");
printf("Command? ");
cho=upcase(getche());
command();
switch(cho) {
case 'N':
nogo();
smallbed();
case 'S':
nogo();
smallbed();
case 'E':
nogo();
smallbed();
case 'W':
halltwo();
case '?':
help();
smallbed();
case 'Q':
quit();
default:
smallbed();
}
}