Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fonction qui dit si la partie est terminée ou non
//à caser où tu veux
//dépendances : MovePlan, Emplacement
bool isOver(Emplacement grille[TAILLE][TAILLE]) {
MovePlan tmp;
int x,y,k,l;
for (x = 0; x < TAILLE; ++x)
for (y = 0; y < TAILLE; ++y)
if(grille[x][y].valeur == 2)
continue;
else
for (k = -1; k <= 1; ++k)
for (l = -1; l <= 1; ++l)
if(tmp.init(x, y, x+l, y+k, team, grille) != -1)
return false;
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.