[Echecs] Correction et amélioration Logique::eNoir

This commit is contained in:
Geoffrey Frogeye 2014-12-06 23:29:55 +01:00
parent 1639150362
commit 555deb4f35

View file

@ -20,14 +20,8 @@ class LogiqueEchecs:
self.nvPartie()
@staticmethod
def eNoir(xD, yD): # TODO Peut être considérablement amélioré
i = 1
for x in range(0, CASES_COTE):
i += 1
for y in range(0, CASES_COTE):
i += 1
if x == xD and y == yD:
return i % 2
def eNoir(xD, yD):
return xD % 2 != yD % 2
def cGrille(self):
for x in range(CASES_COTE):