admin管理员组

文章数量:1637214

C语言简易文字冒险游戏源代码

C语言简易文字冒险游戏源代码

#include

#include

#include

int choice;

char a=0,b=0,c=0,d=0;

int user_input;

void wait()

{

Sleep(100);

user_input=getchar();

}

void cls()

{

Sleep(100);

system("cls");

}

int main(int argc, char *argv[])

{

start:cls();

goto a1;

gameover:printf("游戏结束。");

printf("按回车键继续");

user_input=getchar();

if(user_input=13)

goto start;

a1:printf("现在游戏开始。");

user_input=getchar();

printf("你住在山中的木屋里。");

wait();

printf("某天早上,你刚要出门,却发现不远处有一座从未见过的城堡。");

wait();

printf("出于好奇,你走近了它。");

wait();

goto a4;<

本文标签: 冒险游戏语言源代码简易文字