Esempio n. 1
0
void
newgame()
{

	fobj = invent = level.buriedobjlist = migrating_objs = (struct obj *)0;
	fmon = migrating_mons = (struct monst *)0;
	ftrap = 0;
	flags.ident = 1;

	if(wiz1_level.dlevel == 0) init_dungeons();
	init_objects();		/* must be before u_init() */
	u_init();
	init_artifacts();	/* must be after u_init() */

#ifndef NO_SIGNAL
	(void) signal(SIGINT, (SIG_RET_TYPE) done1);
#endif
#ifdef NEWS
	if(flags.news) display_file(NEWS, FALSE);
#endif
#ifdef MULDGN
	load_qtlist();	/* load up the quest text info */
	quest_init();
	if(flags.legacy && moves == 1) com_pager(1);
#endif
	mklev();
	u_on_upstairs();
	check_special_room(FALSE);
	vision_reset();		/* set up internals for level (after mklev) */

	flags.botlx = 1;

	/* Move the monster from under you or else
	 * makedog() will fail when it calls makemon().
	 * 			- ucsfcgl!kneller
	 */
	if(MON_AT(u.ux, u.uy)) mnexto(m_at(u.ux, u.uy));

#ifdef CLIPPING
	cliparound(u.ux, u.uy);
#endif
	(void) makedog();
	docrt();

#ifdef INSURANCE
	save_currentstate();
#endif
	return;
}
Esempio n. 2
0
int main(void)
{
	quest_init();
	system("clear");
	item points=0;
	printf("\t\t\t\t\tThis is the memory testing game\n"
			"\t\t\t\t\t-------------------------------\n"
			"\t\t\tu are going to be asked to memorise a set of numbers and reproduce them back\n\n");
	printf("\t\t\t\t\tFirst of all select ur level");
	
	printf("\n\t1\tEasy(3#)\n\t2\tNormal(5#)\n\t3\tDifficult(7#)\n\t0\tEscape(exit)\n");
	
	scanf("%c", &level);
	while(level!='0')
	{
		switch(level)
		{
			case '1':
				points+=memory_test_level(3);
				break;
			case '2':
				points+=memory_test_level(5);
				break;
			case '3':
				points+=memory_test_level(7);
				break;
			case '0':
				statistics();
				return 0;
			default:
				printf("wrong option. New option > ");
				goto SCN;
		}
		fflush(stdin);
		printf(" |---------Accumulated points ------- : | %d |\n\n", points);
	printf(" chose a new level\n");
	printf("\n\t1\tEasy(3#)\n\t2\tNormal(5#)\n\t3\tDifficult(7#)\n\t0\tEscape(exit)\n");
SCN:scanf("%c", &level);
	}

return 0;
}