亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wump.c

?? unix v7是最后一個廣泛發布的研究型UNIX版本
?? C
字號:
#/* *	wumpus *	stolen from PCC Vol 2 No 1 */#define	NBAT	3#define	NROOM	20#define	NTUNN	3#define	NPIT	3struct room{	int	tunn[NTUNN];	int	flag;} room[NROOM];char	*intro[]{	"\n",	"Welcome to 'Hunt the Wumpus.'\n",	"\n",	"The Wumpus lives in a cave of %d rooms.\n",	"Each room has %d tunnels leading to other rooms.\n",	"\n",	"Hazards:\n",	"\n",	"Bottomless Pits - Some rooms have Bottomless Pits in them.\n",	"	If you go there, you fall into the pit and lose!\n",	"Super Bats - Some other rooms have super bats.\n",	"	If you go there, a bat will grab you and take you to\n",	"	somewhere else in the cave where you could\n",	"	fall into a pit or run into the . . .\n",	"\n",	"Wumpus:\n",	"\n",	"The Wumpus is not bothered by the hazards since\n",	"he has sucker feet and is too big for a bat to lift.\n",	"\n",	"Usually he is asleep.\n",	"Two things wake him up:\n",	"	your entering his room\n",	"	your shooting an arrow anywhere in the cave.\n",	"If the wumpus wakes, he either decides to move one room or\n",	"stay where he was.  But if he ends up where you are,\n",	"he eats you up and you lose!\n",	"\n",	"You:\n",	"\n",	"Each turn you may either move or shoot a crooked arrow.\n",	"\n",	"Moving - You can move to one of the adjoining rooms;\n",	"	that is, to one that has a tunnel connecting it with\n",	"	the room you are in.\n",	"\n",	"Shooting - You have 5 arrows.  You lose when you run out.\n",	"	Each arrow can go from 1 to 5 rooms.\n",	"	You aim by telling the computer\n",	"	The arrow's path is a list of room numbers\n",	"	telling the arrow which room to go to next.\n",	"	The list is terminated with a 0.\n",	"	The first room in the path must be connected to the\n",	"	room you are in.  Each succeeding room must be\n",	"	connected to the previous room.\n",	"	If there is no tunnel between two of the rooms\n",	"	in the arrow's path, the arrow chooses one of the\n",	"	three tunnels from the room it's in and goes its\n",	"	own way.\n",	"\n",	"	If the arrow hits the wumpus, you win!\n",	"	If the arrow hits you, you lose!\n",	"\n",	"Warnings:\n",	"\n",	"When you are one or two rooms away from the wumpus,\n",	"the computer says:\n",	"		'I smell a Wumpus'\n",	"When you are one room away from some other hazard, it says:\n",	"		Bat    - 'Bats nearby'\n",	"		Pit    - 'I feel a draft'\n",	"\n",	0,};#define	BAT	01#define	PIT	02#define	WUMP	04int	arrow;int	loc;int	wloc;int	tchar;main(){	register i, j;	register struct room *p;	int k, icomp();	printf("Instructions? (y-n) ");	if(rline() == 'y')		for(i=0; intro[i]; i++)			printf(intro[i], i&1? NROOM: NTUNN);/* * initialize the room connections */init:	p = &room[0];	for(i=0; i<NROOM; i++) {		for(j=0; j<NTUNN; j++)			p->tunn[j] = -1;		p++;	}	k = 0;	for(i=1; i<NROOM; ) {		j = rnum(NROOM);		p = &room[j];		if(j == k || p->tunn[0] >= 0 || p->tunn[1] >= 0)			continue;		p->tunn[1] = k;		room[k].tunn[0] = j;		k = j;		i++;	}	p = &room[0];	for(i=0; i<NROOM; i++) {		for(j=0; j<NTUNN; j++) {			if(p->tunn[j] < 0)				p->tunn[j] = tunnel(i);			if(p->tunn[j] == i)				goto init;			for(k=0; k<j; k++)				if(p->tunn[j] == p->tunn[k])					goto init;		}		qsort(&p->tunn[0], NTUNN, 2, icomp);		p++;	}/* * put in player, wumpus, * pits and bats */setup:	arrow = 5;	p = &room[0];	for(i=0; i<NROOM; i++) {		p->flag = 0;		p++;	}	for(i=0; i<NPIT; ) {		p = &room[rnum(NROOM)];		if((p->flag&PIT) == 0) {			p->flag =| PIT;			i++;		}	}	for(i=0; i<NBAT; ) {		p = &room[rnum(NROOM)];		if((p->flag&(PIT|BAT)) == 0) {			p->flag =| BAT;			i++;		}	}	i = rnum(NROOM);	wloc = i;	room[i].flag =| WUMP;	for(;;) {		i = rnum(NROOM);		if((room[i].flag&(PIT|BAT|WUMP)) == 0) {			loc = i;			break;		}	}/* *	main loop of the game */loop:	printf("You are in room %d\n", loc+1);	p = &room[loc];	if(p->flag&PIT) {		printf("You fell into a pit\n");		goto done;	}	if(p->flag&WUMP) {		printf("You were eaten by the wumpus\n");		goto done;	}	if(p->flag&BAT) {		printf("Theres a bat in your room\n");		loc = rnum(NROOM);		goto loop;	}	for(i=0; i<NTUNN; i++)	if(near(&room[p->tunn[i]], WUMP))		goto nearwump;	if (near(p, WUMP)) {	nearwump:		printf("I smell a wumpus\n");	}	if (near(p, BAT))		printf("Bats nearby\n");	if (near(p, PIT))		printf("I feel a draft\n");	printf("There are tunnels to");	for(i=0; i<NTUNN; i++)		printf(" %d", p->tunn[i]+1);	printf("\n");again:	printf("Move or shoot (m-s) ");	switch(rline()) {	case 'm':		if(tchar == '\n')			printf("which room? ");		i = rin()-1;		for(j=0; j<NTUNN; j++)			if(i == p->tunn[j])				goto groom;		printf("You hit the wall\n");		goto again;	groom:		loc = i;		if(i == wloc)			goto mwump;		goto loop;	case 's':		if(tchar == '\n')			printf("Give list of rooms terminated by 0\n");		for(i=0; i<5; i++) {			j = rin()-1;			if(j == -1)				break;		ranarw:			for(k=0; k<NTUNN; k++)				if(j == p->tunn[k])					goto garow;			j = rnum(NROOM);			goto ranarw;		garow:			p = &room[j];			if(j == loc) {				printf("You shot yourself\n");				goto done;			}			if(p->flag&WUMP) {				printf("You slew the wumpus\n");				goto done;			}		}		if(--arrow == 0) {			printf("That was your last shot\n");			goto done;		}		goto mwump;	}	goto again;mwump:	p = &room[wloc];	p->flag =& ~WUMP;	i = rnum(NTUNN+1);	if(i != NTUNN)		wloc = p->tunn[i];	room[wloc].flag =| WUMP;	goto loop;done:	printf("Another game? (y-n) ");	if(rline() == 'y') {		printf("Same room setup? (y-n) ");		if(rline() == 'y')			goto setup;		goto init;	}}tunnel(i){	register struct room *p;	register n, j;	int c;	c = 20;loop:	n = rnum(NROOM);	if(n == i)		if(--c > 0)			goto loop;	p = &room[n];	for(j=0; j<NTUNN; j++)	if(p->tunn[j] == -1) {		p->tunn[j] = i;		return(n);	}	goto loop;}rline(){	register char c, r;	while((c=getchar()) == ' ');	r = c;	while(c != '\n' && c != ' ') {		if(c == '\0')			exit();		c = getchar();	}	tchar = c;	return(r);}rnum(n){	static first[2];	if(first[1] == 0) {		time(first);		srand((first[1]*first[0])^first[1]);	}	return((rand()/32768.0) * n);}rin(){	register n, c;	n = 0;	c = getchar();	while(c != '\n' && c != ' ') {		if(c<'0' || c>'9') {			while(c != '\n') {				if(c == 0)					exit();				c = getchar();			}			return(0);		}		n = n*10 + c-'0';		c = getchar();	}	return(n);}near(ap, ahaz)struct room *ap;{	register struct room *p;	register haz, i;	p = ap;	haz = ahaz;	for(i=0; i<NTUNN; i++)	if(room[p->tunn[i]].flag & haz)		return (1);	return(0);}icomp(p1, p2)int *p1, *p2;{	return(*p1 - *p2);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
另类综合日韩欧美亚洲| 欧美性猛交xxxxxx富婆| 日本久久一区二区| 精品国产3级a| 一区二区在线观看不卡| 国产成人在线网站| 欧美一区二区久久久| 亚洲猫色日本管| 国产黄色精品视频| 日韩一区二区三区免费观看| 亚洲精品欧美综合四区| 国产99久久久国产精品潘金| 欧美一区二区久久| 亚洲va国产va欧美va观看| 97久久超碰国产精品| 国产午夜精品美女毛片视频| 日本中文一区二区三区| 精品视频免费看| 亚洲一区二区在线免费看| 99re66热这里只有精品3直播 | 日本欧洲一区二区| 在线观看精品一区| 亚洲欧美日韩国产另类专区| 国产成人av影院| 国产日本一区二区| 国产精品资源在线| 久久新电视剧免费观看| 韩国v欧美v日本v亚洲v| 欧美精品一区二区不卡| 韩国成人在线视频| 国产日韩欧美电影| 国产成人鲁色资源国产91色综| 日韩精品资源二区在线| 麻豆国产精品视频| 久久综合九色综合欧美98| 久久国产精品区| 精品日韩一区二区三区免费视频| 日韩中文字幕麻豆| 欧美一级在线视频| 久久99精品久久久久久久久久久久| 日韩精品一区二区三区视频| 久久精品国产澳门| 欧美r级在线观看| 国产九色sp调教91| 中文字幕亚洲成人| 91豆麻精品91久久久久久| 亚洲午夜视频在线观看| 91精品国产美女浴室洗澡无遮挡| 奇米精品一区二区三区在线观看一| 日韩免费高清视频| 丁香激情综合五月| 亚洲美女电影在线| 91精品久久久久久久91蜜桃| 精品一区二区三区在线播放视频| 久久久国际精品| 色综合久久中文综合久久牛| 亚洲国产综合色| 日韩一区二区三| 成人小视频免费观看| 亚洲尤物视频在线| 亚洲精品一区二区在线观看| 波多野结衣视频一区| 亚洲妇女屁股眼交7| 欧美成人艳星乳罩| 99re8在线精品视频免费播放| 亚洲影视在线观看| 久久精品亚洲麻豆av一区二区| 91麻豆国产在线观看| 久久99这里只有精品| 亚洲免费观看视频| 欧美xxxx老人做受| 色哟哟一区二区三区| 久久99国产精品成人| 亚洲另类在线制服丝袜| 精品少妇一区二区三区日产乱码 | 视频在线在亚洲| 国产欧美一区二区精品仙草咪| 91国偷自产一区二区使用方法| 免费高清在线一区| 一区二区三区欧美久久| 久久久综合视频| 欧美精品九九99久久| 成人av在线电影| 老汉av免费一区二区三区| 亚洲精品v日韩精品| 国产亚洲精品精华液| 欧美一区二区在线免费观看| 婷婷综合五月天| 亚洲精品国产a| 日本乱人伦aⅴ精品| 国内精品免费在线观看| 亚洲sss视频在线视频| 国产精品久久久久久久久免费丝袜 | 成人国产精品免费观看| 奇米影视7777精品一区二区| 亚洲激情欧美激情| 国产精品麻豆久久久| 久久久久久夜精品精品免费| 制服丝袜亚洲色图| 欧美日韩一区二区在线观看| 93久久精品日日躁夜夜躁欧美| 国产一区二区福利视频| 老司机精品视频导航| 日韩高清不卡一区二区三区| 亚洲国产日韩在线一区模特| 亚洲另类在线一区| 一区二区三区精品久久久| 国产精品进线69影院| 欧美国产一区二区| 国产精品每日更新| 成人免费在线播放视频| 中文字幕国产一区| 国产精品国产三级国产aⅴ中文| 国产亚洲精品精华液| 国产欧美日韩久久| 国产精品进线69影院| 亚洲人123区| 亚洲专区一二三| 一卡二卡三卡日韩欧美| 亚洲h在线观看| 日日欢夜夜爽一区| 久久99九九99精品| 国产很黄免费观看久久| 成人免费高清在线| 91影院在线观看| 欧美吻胸吃奶大尺度电影| 欧美日韩中文国产| 欧美大胆一级视频| 久久久国产精品午夜一区ai换脸| 久久免费电影网| 一区在线播放视频| 亚洲自拍偷拍综合| 免费观看在线综合| 国产精品亚洲午夜一区二区三区| 国产成人午夜精品5599| 91亚洲精品久久久蜜桃| 欧美久久一二区| 欧美精品一区二区在线播放| 亚洲国产电影在线观看| 亚洲精品国产高清久久伦理二区 | 一色屋精品亚洲香蕉网站| 亚洲最大成人综合| 蜜臀久久久99精品久久久久久| 国产成人精品一区二区三区四区| 成人免费av资源| 欧美老女人在线| 中文字幕成人在线观看| 亚洲午夜久久久久久久久电影网 | 亚洲国产精品一区二区久久| 九色|91porny| 91免费视频网址| 日韩欧美国产一区二区三区| 国产精品久久久久aaaa樱花| 午夜久久福利影院| 岛国av在线一区| 欧美美女视频在线观看| 日本一区二区在线不卡| 午夜精品视频一区| 成人网男人的天堂| 欧美一区二区国产| 亚洲美女免费视频| 国产成人综合视频| 91麻豆精品国产91久久久久久久久 | 国产精品一二三在| 欧美高清视频在线高清观看mv色露露十八 | 国产精品丝袜黑色高跟| 婷婷亚洲久悠悠色悠在线播放| 国产一区二区久久| 69久久夜色精品国产69蝌蚪网| 欧美国产日韩亚洲一区| 日韩成人一区二区三区在线观看| 成人黄色一级视频| 亚洲精品在线一区二区| 亚洲成人资源在线| 91在线精品一区二区三区| 精品久久人人做人人爱| 亚洲成国产人片在线观看| 高清在线不卡av| 精品国产乱码久久久久久闺蜜| 亚洲一区二区在线免费观看视频| 成人av资源网站| 久久人人爽爽爽人久久久| 日本最新不卡在线| 欧美卡1卡2卡| 亚洲自拍都市欧美小说| 91亚洲精华国产精华精华液| 国产日产亚洲精品系列| 国产一区二区按摩在线观看| 日韩欧美专区在线| 免费一级片91| 91精品国产aⅴ一区二区| 天堂va蜜桃一区二区三区漫画版| 色综合一区二区| 亚洲色图另类专区| 91麻豆国产在线观看| 亚洲精品免费在线| 一本色道a无线码一区v| 亚洲色图.com| 欧洲av一区二区嗯嗯嗯啊| 亚洲精品成a人|