Created
June 4, 2017 10:34
-
-
Save snwfdhmp/1c1cc01128595104f7d1c3617b399a6b to your computer and use it in GitHub Desktop.
Fonction qui dit si la partie est terminée ou non
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//à 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