public void Solve(ICube cube) { var edgePositions = cube.GetEdgePositions(Color.White, new[] { FaceType.Back, FaceType.Down, FaceType.Left, FaceType.Right, FaceType.Up }); foreach (var edgePosition in edgePositions) { if (!algorythms.ContainsKey(edgePosition)) { continue; } var algorythm = algorythms[edgePosition]; var rotations = MoveInterpretor.Interpret(algorythm); foreach (var rotation in rotations) { cube.Rotate(rotation); } } }
public void WhenInterpretMoves() { rotationsInfos = MoveInterpretor.Interpret(moves); }