public void RubixCubeSolver_SolvesRandomRubixCube() { var cube = new RubixCube(); cube.Randomise(); var solver = new RubixCubeSolver(cube); solver.Solve(); Assert.AreEqual(_solvedCube, cube.Cube); }
private static void SolveRubixCube(Options opts) { var cube = GetParsedCube(opts); var rubixCube = new RubixCube(cube); var solver = new RubixCubeSolver(rubixCube); solver.Solve(); using var file = new StreamWriter(opts.OutputPath); foreach (var(num, direction, side) in rubixCube.Instructions) { file.WriteLine($"{num} - {direction}: {side}"); } }