void	ft_boucle_f13_big(int flag[26])
{
	int testLarg13;
	int testHaut13;

	testHaut13 = 0;
	testLarg13 = 0;
	i13 = 0;
	if (flag[12] == 0)
	{
		clean13 = (int *)malloc(sizeof(int) * (tailleMax * tailleMax));
		nbrCourant13 = nbrCourant14 + 1;
		flag[12] = 1;
	}
	ft_strcpy_int(clean13, tmpCalc, tailleMax * tailleMax);
	while (i13 < iterMax && testHaut13 < testMax + 1 && trouve == 0)
	{
		tampon = resitue(clean13, (4 * nbrCourant13), tailleMax);
		tmpCalc = try_tetris_2(tampon, points[nbrCourant13], tailleMax, var,
				nbrCourant13, (4 * nbrCourant13), i13);
		testHaut13 = abs_minus(calc_larg(tmpCalc, tailleMax), calc_haut(tmpCalc, tailleMax));
		testLarg13 = abs_minus(calc_larg(tmpCalc, tailleMax), calc_haut(tmpCalc, tailleMax));
		if (testLarg13 < testMax + 1)
		{
			tampon = resitue(tmpCalc, (4 * nbrCourant13), tailleMax);
			ft_boucle_f12_big(flag);
		}
		i13++;
	}
}
void	ft_boucle_f15_big(int flag[26])
{
	int testLarg15;
	int testHaut15;

	testHaut15 = 0;
	testLarg15 = 0;
	i15 = 0;
	if (flag[15] == 0)
	{
		clean15 = (int *)malloc(sizeof(int) * (tailleMax * tailleMax));
		nbrCourant15 = nbrCourant16 + 1;
		flag[14] = 1;
	}
	ft_strcpy_int(clean15, tmpCalc, tailleMax * tailleMax);
	while (i15 < iterMax)
	{
		tampon = resitue(clean15, (4 * nbrCourant15), tailleMax);
		tmpCalc = try_tetris_2(tampon, points[nbrCourant15], tailleMax, var,
				nbrCourant, (4 * nbrCourant15), i15);
		testHaut15 = abs_minus(calc_larg(tmpCalc, tailleMax), calc_haut(tmpCalc, tailleMax));
		testLarg15 = abs_minus(calc_larg(tmpCalc, tailleMax), calc_haut(tmpCalc, tailleMax));
		if (testLarg15 < testMax + 1)
		{
			tampon = resitue(tmpCalc, (4 * nbrCourant15), tailleMax);
			ft_boucle_f14_big(flag);
		}
		i15++;
	}
}
示例#3
0
/** @details
 * @param player hráč pro srovnání
 * @return Vrací TRUE, pokud mají hráči stejné souřadnice i směr otočení.
 * Ve hře to znamená, že se překrývají, tudíž spodní není vůbec vidět.
 */
bool Player::operator==(const Player & player) const {
	return d_==player.d_
		&& abs_minus(x_, player.x_)<3
		&& abs_minus(y_, player.y_)<3;
}