Rubik's Cube Solver mit 3D-Darstellung

  • C#

Es gibt 85 Antworten in diesem Thema. Der letzte Beitrag () ist von Switcherlapp97.

    Rubik's Cube Solver mit 3D-Darstellung

    Hallo

    Ich arbeite derzeit an einem Rubiks Cube Solver und würde gerne eine 3D Darstellung des Würfels in mein Programm einbringnen. Die 3D-Würfel soll ungefähr in dieser Form dargestellt werden:

    Ich habe erste Versuche mit GDI gewagt und bin mit einer Transformationsmatrix auf folgendes Ergebnis gestoßen:

    C#-Quellcode

    1. //bl = Blocklänge
    2. //br SolidBrush mit der Farbe der Fläche
    3. //b ist ein Block-Objekt; X,Y und Z beschreiben die Position des Blocks
    4. br.Color = GetColor(b.BlockColors[0]);
    5. int x = 3 * bl + b.X * bl - bl;
    6. int y = bl + b.Z * bl / 2 - bl/2;
    7. Matrix m = new Matrix();
    8. m.Shear(-1, 0);
    9. g.Transform = m;
    10. g.FillRectangle(br, x, y, bl, bl / 2);
    11. g.DrawRectangle(Pens.Black, x, y, bl, bl / 2);

    Mit der Up-Fläche hat das ganz gut geklappt. Bei der Right-Ebene komme ich jedoch nicht mehr weiter. Ich habe mal einen Ansatz gemacht:

    C#-Quellcode

    1. br.Color = GetColor(b.BlockColors[2]);
    2. int x = 6 * bl - b.Y * bl / 2;
    3. int y = 7 * bl - b.Z * bl;
    4. Matrix m = new Matrix();
    5. m.Rotate(-45);
    6. m.Shear(-1, 0);
    7. g.Transform = m;
    8. g.FillRectangle(br, x, y, bl / 2, bl);
    9. g.DrawRectangle(Pens.Black, x, y, bl / 2, bl);

    Das Ergebnis schaut nicht sehr vielversprechend aus:

    Ist es überhaupt möglich mit GDI komfortabel 3D-Würfel zu zeichnen oder habe ich einen komplett falschen Ansatz :?:

    Hier zur Sicherheit noch der Code der gesamten Methode:

    C#-Quellcode

    1. public void Draw3DTop(Graphics g, int BlockHeight)
    2. {
    3. int bl = BlockHeight;
    4. SolidBrush br = new SolidBrush(Color.Black);
    5. foreach (Block b in Blocks)
    6. {
    7. //Up
    8. if (b.Y == 3)
    9. {
    10. br.Color = GetColor(b.BlockColors[0]);
    11. int x = 3 * bl + b.X * bl - bl;
    12. int y = bl + b.Z * bl / 2 - bl/2;
    13. Matrix m = new Matrix();
    14. m.Shear(-1, 0, MatrixOrder.Append);
    15. g.Transform = m;
    16. g.FillRectangle(br, x, y, bl, bl / 2);
    17. g.DrawRectangle(Pens.Black, x, y, bl, bl / 2);
    18. }
    19. //Right
    20. if (b.X == 3)
    21. {
    22. br.Color = GetColor(b.BlockColors[2]);
    23. int x = 6 * bl - b.Y * bl / 2;
    24. int y = 7 * bl - b.Z * bl;
    25. Matrix m = new Matrix();
    26. m.Rotate(-45);
    27. m.Shear(-1, 0);
    28. g.Transform = m;
    29. g.FillRectangle(br, x, y, bl / 2, bl);
    30. g.DrawRectangle(Pens.Black, x, y, bl / 2, bl);
    31. }
    32. }
    33. }


    Danke
    Switcherlapp97
    RubiksCubeSolver


    Jetzt im Showroom

    Dieser Beitrag wurde bereits 2 mal editiert, zuletzt von „Switcherlapp97“ ()

    @diylab
    Danke für deine Antwort :) Ich werde mir das Tutorial anschauen und dann posten ob es geklappt hat

    @nafets3646
    Hast du bei deinem Programm eine 3D-Darstellung des Cubes gemacht?
    RubiksCubeSolver


    Jetzt im Showroom
    Wie ich schon gesagt habe, nur als Textausgabe. Ein Cube in 3D-Darstellung wird aber nicht weiter schwer sein, denke ich (die Aussage vorhin war eigentlich OffTopic ;)).
    @diylab
    Also das Youtube-Tutorial hat mir nicht sonderlich viel gebracht. In deinem zweiten Post hat mir der Link mit Download (dein zweiter Link) sehr geholfen und ich habe nun einen 3D-Würfel gebastelt. Jetzt muss ich das mit den einzelnen Blöcken noch umsetzen, was sicher eine Herausforderung wird.

    Falls ich ein zufriedenstellendes Ergebnis habe, werde ich das natürlich hier posten und vielleicht kann @nafets3646 sein Programm mit meiner 3D-Darstellung dann noch erweitern :P

    Danke für die bisherigen Antworten
    Switcherlapp97
    RubiksCubeSolver


    Jetzt im Showroom
    Also ich habe diesen Link als Vorlage verwendet und in C# dann etwas ähnliches gebastelt. Hier das Ergebnis:

    Die Point3D Klasse:
    Code der Point3D-Klasse

    C#-Quellcode

    1. public class Point3D
    2. {
    3. private double px, py, pz;
    4. public double X
    5. {
    6. get { return px; }
    7. set { px = value; }
    8. }
    9. public double Y
    10. {
    11. get { return py; }
    12. set { py = value; }
    13. }
    14. public double Z
    15. {
    16. get { return pz; }
    17. set { pz = value; }
    18. }
    19. public Point3D (double x, double y,double z)
    20. {
    21. X = x;
    22. Y = y;
    23. Z = z;
    24. }
    25. public Point3D RotateX(int angle)
    26. {
    27. double rad = 0;
    28. double cosa = 0;
    29. double sina = 0;
    30. double yn = 0;
    31. double zn = 0;
    32. rad = angle * Math.PI / 180;
    33. cosa = Math.Cos(rad);
    34. sina = Math.Sin(rad);
    35. yn = this.Y * cosa - this.Z * sina;
    36. zn = this.Y * sina + this.Z * cosa;
    37. return new Point3D(this.X, yn, zn);
    38. }
    39. public Point3D RotateY(int angle)
    40. {
    41. double rad = 0;
    42. double cosa = 0;
    43. double sina = 0;
    44. double Xn = 0;
    45. double Zn = 0;
    46. rad = angle * Math.PI / 180;
    47. cosa = Math.Cos(rad);
    48. sina = Math.Sin(rad);
    49. Zn = this.Z * cosa - this.X * sina;
    50. Xn = this.Z * sina + this.X * cosa;
    51. return new Point3D(Xn, this.Y, Zn);
    52. }
    53. public Point3D RotateZ(int angle)
    54. {
    55. double rad = 0;
    56. double cosa = 0;
    57. double sina = 0;
    58. double Xn = 0;
    59. double Yn = 0;
    60. rad = angle * Math.PI / 180;
    61. cosa = Math.Cos(rad);
    62. sina = Math.Sin(rad);
    63. Xn = this.X * cosa - this.Y * sina;
    64. Yn = this.X * sina + this.Y * cosa;
    65. return new Point3D(Xn, Yn, this.Z);
    66. }
    67. public Point3D Project(int viewWidth, int viewHeight, int fov, int viewDistance)
    68. {
    69. double factor = 0;
    70. double Xn = 0;
    71. double Yn = 0;
    72. factor = fov / (viewDistance + this.Z);
    73. Xn = this.X * factor + viewWidth / 2;
    74. Yn = this.Y * factor + viewHeight / 2;
    75. return new Point3D(Xn, Yn, this.Z);
    76. }
    77. }


    Dann noch der Code der Form (Name der Form = Main):
    Code der Form

    C#-Quellcode

    1. public partial class Main : Form
    2. {
    3. Point3D[] Vertices;
    4. Color[] Colors;
    5. int[][] Faces;
    6. Brush[] Brushes;
    7. Timer timer;
    8. int angle;
    9. public Main()
    10. {
    11. InitializeComponent();
    12. this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
    13. this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
    14. timer = new Timer();
    15. timer.Interval = 25;
    16. timer.Tick +=timer_Tick;
    17. timer.Start();
    18. InitCube();
    19. }
    20. void timer_Tick(object sender, EventArgs e)
    21. {
    22. angle+=1;
    23. this.Invalidate();
    24. }
    25. private void InitCube()
    26. {
    27. Vertices = new Point3D[8] { new Point3D(-1, 1, -1), new Point3D(1, 1, -1), new Point3D(1, -1, -1), new Point3D(-1, -1, -1), new Point3D(-1, 1, 1), new Point3D(1, 1, 1), new Point3D(1, -1, 1), new Point3D(-1, -1, 1) };
    28. Colors = new Color[6] { Color.Yellow, Color.Red, Color.White, Color.Orange, Color.Blue, Color.Green };
    29. Faces = new int[6][] { new int[4] { 0, 1, 2, 3 }, new int[4] { 1, 5, 6, 2 }, new int[4] { 5, 4, 7, 6 }, new int[4] { 4, 0, 3, 7 }, new int[4] { 0, 4, 5, 1 }, new int[4] { 3, 2, 6, 7 } };
    30. Brushes = new Brush[6];
    31. for (int i = 0; i < 6; i++)
    32. {
    33. Brushes[i] = new SolidBrush(Colors[i]);
    34. }
    35. }
    36. private void Main_Paint(object sender, PaintEventArgs e)
    37. {
    38. Point3D[] t = new Point3D[9];
    39. int[] f = new int[5];
    40. Point3D v;
    41. double[] avgZ = new double[7];
    42. int[] order = new int[7];
    43. double tmp = 0;
    44. int tmp2 = 0;
    45. int iMax = 0;
    46. e.Graphics.Clear(Color.LightBlue);
    47. for (int i = 0; i < 8; i++)
    48. {
    49. Brush b = new SolidBrush(Color.White);
    50. v = Vertices[i];
    51. t[i] = v.RotateX(angle).RotateY(angle).RotateZ(angle);
    52. t[i] = t[i].Project(200, 200, 100, 4);
    53. }
    54. for (int i = 0; i < 6; i++)
    55. {
    56. double p = t[Faces[i][0]].Z;
    57. p = t[Faces[i][1]].Z;
    58. p = t[Faces[i][2]].Z;
    59. p = t[Faces[i][3]].Z;
    60. avgZ[i] = (t[Faces[i][0]].Z + t[Faces[i][1]].Z + t[Faces[i][2]].Z + t[Faces[i][3]].Z) / 4.0;
    61. order[i] = i;
    62. }
    63. for (int i = 0; i < 5; i++)
    64. {
    65. iMax = i;
    66. for (int j = i + 1; j < 6; j++)
    67. {
    68. if (avgZ[j] > avgZ[iMax])
    69. {
    70. iMax = j;
    71. }
    72. }
    73. if (iMax != i)
    74. {
    75. tmp = avgZ[i];
    76. avgZ[i] = avgZ[iMax];
    77. avgZ[iMax] = tmp;
    78. tmp2 = order[i];
    79. order[i] = order[iMax];
    80. order[iMax] = tmp2;
    81. }
    82. }
    83. for (int i = 0; i < 6; i++)
    84. {
    85. Point[] points;
    86. int index = order[i];
    87. points = new Point[4] { new Point((int)t[Faces[index][0]].X, (int)t[Faces[index][0]].Y), new Point((int)t[Faces[index][1]].X, (int)t[Faces[index][1]].Y), new Point((int)t[Faces[index][2]].X, (int)t[Faces[index][2]].Y), new Point((int)t[Faces[index][3]].X, (int)t[Faces[index][3]].Y) };
    88. e.Graphics.FillPolygon(Brushes[index], points);
    89. e.Graphics.DrawPolygon(Pens.Black, points);
    90. }
    91. }
    92. }


    Das Ergebnis schaut dann so aus:


    Hier noch mein kleines 3D-Cube Projekt gezippt: 3DCube.zip

    Danke für die bisherige Hilfe
    Switcherlapp97
    RubiksCubeSolver


    Jetzt im Showroom
    Ich hab mir mal erlaubt, deine Point3D-Klasse etwas aufzuräumen ;).
    Spoiler anzeigen

    C#-Quellcode

    1. public class Point3D
    2. {
    3. public double X { get; set; }
    4. public double Y { get; set; }
    5. public double Z { get; set; }
    6. public Point3D (double x, double y, double z)
    7. {
    8. this.X = x;
    9. this.Y = y;
    10. this.Z = z;
    11. }
    12. public Point3D Rotate(RotationType type, int angle)
    13. {
    14. double rad = angle * Math.PI / 180;
    15. double cosa = Math.Cos(rad);
    16. double sina = Math.Sin(rad);
    17. switch (type)
    18. {
    19. case RotationType.X:
    20. return new Point3D(this.X, this.Y * cosa - this.Z * sina, this.Y * sina + this.Z * cosa);
    21. case RotationType.Y:
    22. return new Point3D(this.Z * sina + this.X * cosa, this.Y, this.Z * cosa - this.X * sina);
    23. default:
    24. return new Point3D(this.X * cosa - this.Y * sina, this.X * sina + this.Y * cosa, this.Z);
    25. }
    26. }
    27. public Point3D Project(int viewWidth, int viewHeight, int fov, int viewDistance)
    28. {
    29. double factor = fov / (viewDistance + this.Z);
    30. double Xn = this.X * factor + viewWidth / 2;
    31. double Yn = this.Y * factor + viewHeight / 2;
    32. return new Point3D(Xn, Yn, this.Z);
    33. }
    34. public enum RotationType { X, Y, Z }
    35. }
    @nafets3646
    Danke für deine gekürzte Version der Point3D-Klasse. Mit der Darstellung der Rotation beschäftige ich mich vorläufig noch nicht. Ich arbeite im Moment noch daran, dass pro Seite die neuen Felder des Rubiks Cubes korrekt dreidimensional dargestellt werden.

    Gruß
    Switcherlapp97
    RubiksCubeSolver


    Jetzt im Showroom
    Hallo,

    Jetzt brauche ich noch mal eure Hilfe. Wie ich schon geschrieben habe, arbeite ich daran, dass die neun Felder des Rubiks Cubes dreidimensional dargestellt werden. Ich habe nun bereits zwei Ansätze für die Verwirklichung der korrekten Darstellung:

    Ansatz 1:
    Die Liste der Blöcke des Cube Objekts durchgehen und für jeden Block wird dann ein 3D-Würfel gezeichnet (so wie in meiner Beispielanwendung). Die Farben des Blocks sind in einem Array einer Enumeration in den Eigenschaften des Blocks gespeichert. Falls eine Farbe versteckt ist, wird die Fläche nicht gezeichnet. Dieses Verfahren habe ich nur mal mit der oberen Ebene versucht. Hier das Ergebnis:


    Der Code zu Ansatz 1

    C#-Quellcode

    1. public void Draw3D(Graphics g)
    2. {
    3. foreach (Block b in Blocks)
    4. {
    5. if (b.Y == 3)
    6. {
    7. Point3D[] t = new Point3D[9];
    8. int[] f = new int[5];
    9. Point3D v;
    10. double[] avgZ = new double[7];
    11. int[] order = new int[7];
    12. double tmp = 0;
    13. int tmp2 = 0;
    14. int iMax = 0;
    15. for (int i = 0; i < 8; i++)
    16. {
    17. Brush br = new SolidBrush(Color.White);
    18. v = Vertices[i];
    19. t[i] = v.RotateX(angle).RotateY(angle).RotateZ(angle);
    20. t[i] = t[i].Project(b.X * 40, b.Z*40, 50, 6);
    21. }
    22. for (int i = 0; i < 6; i++)
    23. {
    24. double p = t[Faces[i][0]].Z;
    25. p = t[Faces[i][1]].Z;
    26. p = t[Faces[i][2]].Z;
    27. p = t[Faces[i][3]].Z;
    28. avgZ[i] = (t[Faces[i][0]].Z + t[Faces[i][1]].Z + t[Faces[i][2]].Z + t[Faces[i][3]].Z) / 4.0;
    29. order[i] = i;
    30. }
    31. for (int i = 0; i < 5; i++)
    32. {
    33. iMax = i;
    34. for (int j = i + 1; j < 6; j++)
    35. {
    36. if (avgZ[j] > avgZ[iMax])
    37. {
    38. iMax = j;
    39. }
    40. }
    41. if (iMax != i)
    42. {
    43. tmp = avgZ[i];
    44. avgZ[i] = avgZ[iMax];
    45. avgZ[iMax] = tmp;
    46. tmp2 = order[i];
    47. order[i] = order[iMax];
    48. order[iMax] = tmp2;
    49. }
    50. }
    51. for (int i = 0; i < 6; i++)
    52. {
    53. Point[] points;
    54. int index = order[i];
    55. points = new Point[4] { new Point((int)t[Faces[index][0]].X, (int)t[Faces[index][0]].Y), new Point((int)t[Faces[index][1]].X, (int)t[Faces[index][1]].Y), new Point((int)t[Faces[index][2]].X, (int)t[Faces[index][2]].Y), new Point((int)t[Faces[index][3]].X, (int)t[Faces[index][3]].Y) };
    56. if (GetColor(b.BlockColors[index]) != Color.Black)
    57. {
    58. Brush br = new SolidBrush(GetColor(b.BlockColors[index]));
    59. g.FillPolygon(br, points);
    60. g.DrawPolygon(Pens.Black, points);
    61. }
    62. }
    63. }
    64. }
    65. }

    Der Cube wird noch beim Erstellen Initialisiert. Der Code dazu:

    C#-Quellcode

    1. private void InitializeCube()
    2. {
    3. Vertices = new Point3D[8] { new Point3D(-1, 1, -1), new Point3D(1, 1, -1), new Point3D(1, -1, -1), new Point3D(-1, -1, -1), new Point3D(-1, 1, 1), new Point3D(1, 1, 1), new Point3D(1, -1, 1), new Point3D(-1, -1, 1) };
    4. Faces = new int[6][] { new int[4] { 0, 1, 2, 3 }, new int[4] { 1, 5, 6, 2 }, new int[4] { 5, 4, 7, 6 }, new int[4] { 4, 0, 3, 7 }, new int[4] { 0, 4, 5, 1 }, new int[4] { 3, 2, 6, 7 } };
    5. Colors = new Color[6] { Color.Yellow, Color.Red, Color.White, Color.Orange, Color.Blue, Color.Green };
    6. angle = 0;
    7. }


    Ich denke, dass das ein falscher Ansatz ist und habe es anders probiert:

    Ansatz 2:
    Es gibt nur einen ganzen Würfel. Für jede Seite wird ein Farben-Array mit 9 Werten generiert (aktuell habe ich nur für jede Fläche eine Farbe gewählt). In der Schleife, in der die einzelnen Flächen gezeichnet werden, wird die Fläche in 9 gleichgroße Teile geteilt und die Konturen dieser Vierecke werden gezeichnet. So schaut das Ergebnis aus:

    Der Würfel soll so wie in meiner oben geposteten Anwendung rotieren. Es sind alle 6 Flächen mit 9 gleich großen Teilen sichtbar, doch sie rotieren nicht gemeinsam. Es ist etwas schwierig das auf einem Bild darzustellen, deshalb zippe ich nochmal das Projekt und lade es hoch: 3DCube.zip

    Der Code zu Ansatz 2

    C#-Quellcode

    1. public partial class Main : Form
    2. {
    3. Point3D[] Vertices;
    4. Color[] Colors;
    5. int[][] Faces;
    6. Brush[] Brushes;
    7. Timer timer;
    8. int angle;
    9. public Main()
    10. {
    11. InitializeComponent();
    12. this.SetStyle(ControlStyles.AllPaintingInWmPaint, true);
    13. this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
    14. timer = new Timer();
    15. timer.Interval = 25;
    16. timer.Tick +=timer_Tick;
    17. timer.Start();
    18. InitCube();
    19. }
    20. void timer_Tick(object sender, EventArgs e)
    21. {
    22. angle+=1;
    23. this.Invalidate();
    24. }
    25. private void InitCube()
    26. {
    27. Vertices = new Point3D[8] { new Point3D(-1, 1, -1), new Point3D(1, 1, -1), new Point3D(1, -1, -1), new Point3D(-1, -1, -1), new Point3D(-1, 1, 1), new Point3D(1, 1, 1), new Point3D(1, -1, 1), new Point3D(-1, -1, 1) };
    28. Colors = new Color[6] { Color.Yellow, Color.Red, Color.White, Color.Orange, Color.Blue, Color.Green };
    29. Faces = new int[6][] { new int[4] { 0, 1, 2, 3 }, new int[4] { 1, 5, 6, 2 }, new int[4] { 5, 4, 7, 6 }, new int[4] { 4, 0, 3, 7 }, new int[4] { 0, 4, 5, 1 }, new int[4] { 3, 2, 6, 7 } };
    30. Brushes = new Brush[6];
    31. for (int i = 0; i < 6; i++)
    32. {
    33. Brushes[i] = new SolidBrush(Colors[i]);
    34. }
    35. }
    36. private void Main_Paint(object sender, PaintEventArgs e)
    37. {
    38. Point3D[] t = new Point3D[9];
    39. int[] f = new int[5];
    40. Point3D v;
    41. double[] avgZ = new double[7];
    42. int[] order = new int[7];
    43. double tmp = 0;
    44. int tmp2 = 0;
    45. int iMax = 0;
    46. e.Graphics.Clear(Color.LightBlue);
    47. for (int i = 0; i < 8; i++)
    48. {
    49. Brush b = new SolidBrush(Color.White);
    50. v = Vertices[i];
    51. t[i] = v.RotateX(angle).RotateY(angle).RotateZ(angle);
    52. t[i] = t[i].Project(200, 200, 100, 4);
    53. }
    54. for (int i = 0; i < 6; i++)
    55. {
    56. double p = t[Faces[i][0]].Z;
    57. p = t[Faces[i][1]].Z;
    58. p = t[Faces[i][2]].Z;
    59. p = t[Faces[i][3]].Z;
    60. avgZ[i] = (t[Faces[i][0]].Z + t[Faces[i][1]].Z + t[Faces[i][2]].Z + t[Faces[i][3]].Z) / 4.0;
    61. order[i] = i;
    62. }
    63. for (int i = 0; i < 5; i++)
    64. {
    65. iMax = i;
    66. for (int j = i + 1; j < 6; j++)
    67. {
    68. if (avgZ[j] > avgZ[iMax])
    69. {
    70. iMax = j;
    71. }
    72. }
    73. if (iMax != i)
    74. {
    75. tmp = avgZ[i];
    76. avgZ[i] = avgZ[iMax];
    77. avgZ[iMax] = tmp;
    78. tmp2 = order[i];
    79. order[i] = order[iMax];
    80. order[iMax] = tmp2;
    81. }
    82. }
    83. for (int i = 0; i < 6; i++)
    84. {
    85. Point[] points;
    86. int index = order[i];
    87. points = new Point[4] { new Point((int)t[Faces[index][0]].X, (int)t[Faces[index][0]].Y), new Point((int)t[Faces[index][1]].X, (int)t[Faces[index][1]].Y), new Point((int)t[Faces[index][2]].X, (int)t[Faces[index][2]].Y), new Point((int)t[Faces[index][3]].X, (int)t[Faces[index][3]].Y) };
    88. for (double j = 1; j < 4; j++)
    89. {
    90. for (double k = 1; k < 4; k++)
    91. {
    92. double x = ((j - 1) / 3) * (points[3].X - points[2].X) + points[2].X;
    93. double y = ((k - 1) / 3) * (points[1].Y - points[2].Y) + points[2].Y;
    94. Point point3 = new Point((int)x, (int)y);
    95. x = (j / 3) * (points[3].X - points[2].X) + points[2].X;
    96. y = ((k - 1) / 3) *(points[1].Y - points[2].Y) + points[2].Y;
    97. Point point4 = new Point((int)x, (int)y);
    98. x = ((j - 1) / 3) * (points[3].X - points[2].X) + points[2].X;
    99. y = (k / 3) * (points[1].Y - points[2].Y) + points[2].Y;
    100. Point point1 = new Point((int)x, (int)y);
    101. x = (j / 3) * (points[3].X - points[2].X) + points[2].X;
    102. y = (k / 3) * (points[1].Y - points[2].Y) + points[2].Y;
    103. Point point2 = new Point((int)x, (int)y);
    104. Point[] BlockPoints = new Point[4] { point3, point4, point2, point1 };
    105. e.Graphics.FillPolygon(Brushes[index], BlockPoints);
    106. e.Graphics.DrawPolygon(Pens.Black, BlockPoints);
    107. }
    108. }
    109. }
    110. }
    111. }


    Meiner Meinung nach fehlt bei Ansatz 2 nur noch eine Kleinigkeit, bis dieser korrekt funktioniert. Leider habe ich keine Ahnung, wieso der Code nicht das tut, was er soll :(
    Oder soll ich komplett anders vorgehen?

    Ich wäre echt froh, wenn ihr mir nochmal helfen könntet und freue mich über eure Antworten.

    Danke
    Switcherlapp97
    RubiksCubeSolver


    Jetzt im Showroom