Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -71,18 +71,11 @@ class RubiksCube4x4:
|
|
71 |
solution.append("- Restante em vermelho")
|
72 |
solution.append("")
|
73 |
|
74 |
-
# Passos para resolver
|
75 |
solution.append("Passos para resolução:")
|
76 |
solution.append("1. Resolver centros")
|
77 |
-
solution.append(" - Agrupar peças verdes na face superior")
|
78 |
-
solution.append(" - Agrupar peças amarelas na face inferior")
|
79 |
-
solution.append(" - Alinhar centros das faces laterais")
|
80 |
solution.append("2. Resolver bordas")
|
81 |
-
solution.append(" - Parear bordas usando método de slice")
|
82 |
-
solution.append(" - Corrigir paridade se necessário")
|
83 |
solution.append("3. Resolver como 3x3x3")
|
84 |
-
solution.append("
|
85 |
-
solution.append("4. Verificar e corrigir paridades")
|
86 |
|
87 |
return solution
|
88 |
|
@@ -99,6 +92,15 @@ def create_visualization(cube_state):
|
|
99 |
5: "#FFA500" # Laranja
|
100 |
}
|
101 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
face_positions = [
|
103 |
(1, 1), # Face superior
|
104 |
(2, 1), # Face frontal
|
@@ -123,7 +125,7 @@ def create_visualization(cube_state):
|
|
123 |
ax[row, col].set_ylim(0, 1)
|
124 |
ax[row, col].set_xticks([])
|
125 |
ax[row, col].set_yticks([])
|
126 |
-
ax[row, col].set_title(f'Face {face_idx} ({
|
127 |
|
128 |
for i in range(4):
|
129 |
for j in range(4):
|
|
|
71 |
solution.append("- Restante em vermelho")
|
72 |
solution.append("")
|
73 |
|
|
|
74 |
solution.append("Passos para resolução:")
|
75 |
solution.append("1. Resolver centros")
|
|
|
|
|
|
|
76 |
solution.append("2. Resolver bordas")
|
|
|
|
|
77 |
solution.append("3. Resolver como 3x3x3")
|
78 |
+
solution.append("4. Corrigir paridades")
|
|
|
79 |
|
80 |
return solution
|
81 |
|
|
|
92 |
5: "#FFA500" # Laranja
|
93 |
}
|
94 |
|
95 |
+
color_names = {
|
96 |
+
0: "Branco",
|
97 |
+
1: "Amarelo",
|
98 |
+
2: "Verde",
|
99 |
+
3: "Azul",
|
100 |
+
4: "Vermelho",
|
101 |
+
5: "Laranja"
|
102 |
+
}
|
103 |
+
|
104 |
face_positions = [
|
105 |
(1, 1), # Face superior
|
106 |
(2, 1), # Face frontal
|
|
|
125 |
ax[row, col].set_ylim(0, 1)
|
126 |
ax[row, col].set_xticks([])
|
127 |
ax[row, col].set_yticks([])
|
128 |
+
ax[row, col].set_title(f'Face {face_idx} ({color_names[face_idx]})')
|
129 |
|
130 |
for i in range(4):
|
131 |
for j in range(4):
|