[Echecs] Ajout mvt Cavalier
This commit is contained in:
parent
555deb4f35
commit
c47b2fad69
|
@ -131,7 +131,10 @@ class LogiqueEchecs:
|
||||||
return MVT_N_AUTORISE
|
return MVT_N_AUTORISE
|
||||||
|
|
||||||
def mvtPossibleCavalier(self, x1, y1, x2, y2):
|
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):
|
def mvtPossible(self, x1, y1, x2, y2):
|
||||||
pion = self.grille[x1][y1]
|
pion = self.grille[x1][y1]
|
||||||
|
|
Reference in a new issue