示例#1
0
int main() {                                                    /*------------------------------main function------------------------------*/
	setcursortype(NOCURSOR);
	create_world();
	int i;
	srand((unsigned)time(NULL));
	for(;;) {
		ModTick();
		check_wall();//checck_crash
		set_block();
		new_block();
		check_move();//move_block();
		i++;
		Sleep(1);
		if (i>399) {
			i=0;
			move_block(DOWN);
		}
		gotoxy(0,0);
		printf("%3d",b_x);
		gotoxy(0,1);
		printf("%3d",b_y);
		gotoxy(0,3);
		printf("%3d",b_type);
	}


	gotoxy(0,0);
	getch();
}                                                               /*------------------------------main function------------------------------*/
示例#2
0
int main()
{
	//This sets up the hardware
	
	init(0);
	
	// Calling the function to check the wall
	check_wall();
}
示例#3
0
int	run(t_env* env, t_mur* mur)
{
	start_wait(env,4);
	while (1)
	{
		if (env->bonus == 1)
			bonus_down(env);
		move_balle(env);
		move_barre(env);
		check_wall(env, mur);
		resize_env(env, mur);
	}
	return 0;
}