[Echecs] Correction et amélioration Logique::eNoir
This commit is contained in:
parent
1639150362
commit
555deb4f35
|
@ -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):
|
||||
|
|
Reference in a new issue