[Echecs] Ajout mvt Cavalier

This commit is contained in:
Geoffrey Frogeye 2014-12-07 12:49:33 +01:00
parent 555deb4f35
commit c47b2fad69

View file

@ -131,7 +131,10 @@ class LogiqueEchecs:
return MVT_N_AUTORISE
def mvtPossibleCavalier(self, x1, y1, x2, y2):
return MVT_PION_INC
if (abs(x2-x1) == 2 and abs(y2-y1) == 1) or (abs(y2-y1) == 2 and abs(x2-x1) == 1):
return MVT_OK
else:
return MVT_N_AUTORISE
def mvtPossible(self, x1, y1, x2, y2):
pion = self.grille[x1][y1]