Commit 38a290e0 authored by Jimmy DORE's avatar Jimmy DORE
Browse files

Affichage des mouvements et du patron du cube stables

parent d1198783
......@@ -3,29 +3,26 @@ def splitCubeImg(cube,imgRot):
imgSplit = imgRot.split("\n")
sizeCube = len(cubeSplit)
sizeImg = len(imgSplit)
sizeDebutCube = sizeImg - sizeCube
strImg = ""
i = 0
cptCube = 0
while(i < sizeImg):
if i > sizeDebutCube:
while i < sizeImg:
if i <=14 and i > 5:
if cptCube == 6 or cptCube == 7 or cptCube ==8:
spacesManquant = 10 * ' '
else:
spacesManquant = ''
strImg += cubeSplit[cptCube]
if cptCube > 5 :
spacesManquant = 10 * ' '
strImg += spacesManquant
strImg += spacesManquant
strImg += imgSplit[i] + "\n"
cptCube += 1
else :
spacesManquant = 39 * ' '
else:
spacesManquant = 39 * ' '
strImg += spacesManquant
strImg += imgSplit[i] + "\n"
i += 1
if (cptCube < sizeCube):
for j in range (cptCube,sizeCube):
strImg += cubeSplit[j]
return strImg
return strImg
class AffichageMoves():
......@@ -35,7 +32,7 @@ class AffichageMoves():
imgStr+=(" | |\n");
imgStr+=(" | |\n");
imgStr+=(" \/ |\n");
imgStr+=(" ___ ___ ___ |\n");
imgStr+=(" ___ ___ ____ |\n");
imgStr+=(" /___/___/___/| |\n");
imgStr+=(" /___/___/___/||____|\n");
imgStr+=(" /___/___/__ /|/| \n");
......@@ -45,6 +42,11 @@ class AffichageMoves():
imgStr+=(" |___|___|___|/|/ \n");
imgStr+=(" | | | | / \n");
imgStr+=(" |___|___|___|/ \n");
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
return imgStr
......@@ -54,7 +56,7 @@ class AffichageMoves():
imgStr+=(" | |\n");
imgStr+=(" | x2 |\n");
imgStr+=(" \/ |\n");
imgStr+=(" ___ ___ ___ |\n");
imgStr+=(" ___ ___ ____ |\n");
imgStr+=(" /___/___/___/| |\n");
imgStr+=(" /___/___/___/||____|\n");
imgStr+=(" /___/___/__ /|/| \n");
......@@ -64,6 +66,10 @@ class AffichageMoves():
imgStr+=(" |___|___|___|/|/ \n");
imgStr+=(" | | | | / \n");
imgStr+=(" |___|___|___|/ \n");
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
return imgStr
......@@ -83,6 +89,10 @@ class AffichageMoves():
imgStr+=(" |___|___|___|/|/ \n");
imgStr+=(" | | | | / \n");
imgStr+=(" |___|___|___|/ \n");
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
return imgStr
......@@ -92,7 +102,7 @@ class AffichageMoves():
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" ____ ___ ___\n")
imgStr += (" ___ ___ ____ \n")
imgStr += (" /___/___/___/| \n")
imgStr += (" /___/___/___/|| \n")
imgStr += (" /___/___/__ /|/| \n")
......@@ -105,10 +115,8 @@ class AffichageMoves():
imgStr += (" | | \n")
imgStr += (" | \/ \n")
imgStr += (" |__________ \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
return imgStr
def img_F2(self):
......@@ -117,7 +125,7 @@ class AffichageMoves():
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" ____ ___ ___\n")
imgStr += (" ___ ___ ____ \n")
imgStr += (" /___/___/___/| \n")
imgStr += (" /___/___/___/|| \n")
imgStr += (" /___/___/__ /|/| \n")
......@@ -130,10 +138,8 @@ class AffichageMoves():
imgStr += (" | | \n")
imgStr += (" | x2 \/ \n")
imgStr += (" |__________ \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
return imgStr
def img_Fi(self):
......@@ -142,7 +148,7 @@ class AffichageMoves():
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" ____ ___ ___\n")
imgStr += (" ___ ___ ____ \n")
imgStr += (" /___/___/___/| \n")
imgStr += (" /___/___/___/|| \n")
imgStr += (" /___/___/__ /|/| \n")
......@@ -155,10 +161,7 @@ class AffichageMoves():
imgStr += (" | | \n")
imgStr += (" \/ | \n")
imgStr += (" __________| \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
imgStr += (" \n")
return imgStr
def img_L(self):
......@@ -167,7 +170,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ____ ___ ___\n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /| /___/___/___/| \n"
imgStr+=" / | /___/___/___/|| \n"
imgStr+=" / | /___/___/__ /|/| \n"
......@@ -177,6 +180,10 @@ class AffichageMoves():
imgStr+=" / |___|___|___|/|/ \n"
imgStr+=" / | | | | / \n"
imgStr+=" / |___|___|___|/ \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
def img_L2(self):
......@@ -185,7 +192,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ____ ___ ___\n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /| /___/___/___/| \n"
imgStr+=" / | /___/___/___/|| \n"
imgStr+=" / | /___/___/__ /|/| \n"
......@@ -195,6 +202,10 @@ class AffichageMoves():
imgStr+=" / |___|___|___|/|/ \n"
imgStr+=" / | | | | / \n"
imgStr+=" / |___|___|___|/ \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
def img_Li(self):
......@@ -203,7 +214,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ____ ___ ___ \n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /| /___/___/___/| \n"
imgStr+=" / | /___/___/___/|| \n"
imgStr+=" / | /___/___/__ /|/| \n"
......@@ -213,16 +224,19 @@ class AffichageMoves():
imgStr+=" | / |___|___|___|/|/ \n"
imgStr+=" | / | | | | / \n"
imgStr+=" |/ |___|___|___|/ \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
def img_U(self):
imgStr = ""
imgStr+=" \n"
imgStr += " ____________ \n"
imgStr += " / / \n"
imgStr += " / \/ \n"
imgStr += " /___________\n"
imgStr += " ___ ___ ___\n"
imgStr += " ___ ___ ____ \n"
imgStr += " /___/___/___/| \n"
imgStr += " /___/___/___/|| \n"
imgStr += " /___/___/__ /|/| \n"
......@@ -232,16 +246,19 @@ class AffichageMoves():
imgStr += " |___|___|___|/|/ \n"
imgStr += " | | | | / \n"
imgStr += " |___|___|___|/ \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
def img_U2(self):
imgStr = ""
imgStr+=" \n"
imgStr += " ____________ \n"
imgStr += " / / \n"
imgStr += " / x2 \/ \n"
imgStr += " /___________\n"
imgStr += " ___ ___ ___\n"
imgStr += " ___ ___ ____ \n"
imgStr += " /___/___/___/| \n"
imgStr += " /___/___/___/|| \n"
imgStr += " /___/___/__ /|/| \n"
......@@ -251,16 +268,19 @@ class AffichageMoves():
imgStr += " |___|___|___|/|/ \n"
imgStr += " | | | | / \n"
imgStr += " |___|___|___|/ \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
def img_Ui(self):
imgStr = ""
imgStr+=" \n"
imgStr += " ____________ \n"
imgStr += " / / \n"
imgStr += " \/ / \n"
imgStr += " ___________/ \n"
imgStr += " ___ ___ ___\n"
imgStr += " ___ ___ ____ \n"
imgStr += " /___/___/___/| \n"
imgStr += " /___/___/___/|| \n"
imgStr += " /___/___/__ /|/| \n"
......@@ -270,6 +290,10 @@ class AffichageMoves():
imgStr += " |___|___|___|/|/ \n"
imgStr += " | | | | / \n"
imgStr += " |___|___|___|/ \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
def img_D(self):
......@@ -278,7 +302,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ___ ___ ___ \n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /___/___/___/| \n"
imgStr+=" /___/___/___/|| \n"
imgStr+=" /___/___/__ /|/| \n"
......@@ -300,7 +324,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ___ ___ ___ \n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /___/___/___/| \n"
imgStr+=" /___/___/___/|| \n"
imgStr+=" /___/___/__ /|/| \n"
......@@ -322,7 +346,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ___ ___ ___ \n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /___/___/___/| \n"
imgStr+=" /___/___/___/|| \n"
imgStr+=" /___/___/__ /|/| \n"
......@@ -344,7 +368,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ___ ___ ___ \n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /___/___/___/| /| \n"
imgStr+=" /___/___/___/|| / | \n"
imgStr+=" /___/___/__ /|/| / |\n"
......@@ -354,6 +378,10 @@ class AffichageMoves():
imgStr+=" |___|___|___|/|/ | / \n"
imgStr+=" | | | | / | / \n"
imgStr+=" |___|___|___|/ |/ \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
def img_R2(self):
......@@ -362,7 +390,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ___ ___ ___ \n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /___/___/___/| /| \n"
imgStr+=" /___/___/___/|| / | \n"
imgStr+=" /___/___/__ /|/| / |\n"
......@@ -372,6 +400,10 @@ class AffichageMoves():
imgStr+=" |___|___|___|/|/ | / \n"
imgStr+=" | | | | / | / \n"
imgStr+=" |___|___|___|/ |/ \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
def img_Ri(self):
......@@ -380,7 +412,7 @@ class AffichageMoves():
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" \n"
imgStr+=" ___ ___ ___ \n"
imgStr+=" ___ ___ ____ \n"
imgStr+=" /___/___/___/| /| \n"
imgStr+=" /___/___/___/|| / | \n"
imgStr+=" /___/___/__ /|/| / |\n"
......@@ -389,5 +421,9 @@ class AffichageMoves():
imgStr+=" | | | | /|| | | \n"
imgStr+=" |___|___|___|/|/ \/ / \n"
imgStr+=" | | | | / / \n"
imgStr+=" |___|___|___|/ / \n"
imgStr+=" |___|___|___|/ / \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
imgStr += " \n"
return imgStr
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment