Пример #1
0
 /// <summary>
 /// Executes a list of moves on a specified cube.
 /// </summary>
 /// <param name="cube">The cube.</param>
 /// <param name="algo">The algorithm.</param>
 public static void ExecuteAlgorithm(Cube cube, IEnumerable <Move> algo)
 {
     foreach (Move m in algo)
     {
         cube.ExecuteMove(m);
     }
 }
Пример #2
0
        /// <summary>
        /// Executes the algorithm on the specified cube.
        /// </summary>
        /// <param name="cube"></param>
        public void Execute(Cube cube)
        {
            cube.SetView(View);

            foreach (Move m in Algorithm)
            {
                cube.ExecuteMove(m);
            }
        }
Пример #3
0
 /// <summary>
 /// Adds a move to the current algorithm.
 /// </summary>
 /// <param name="move">The move.</param>
 private void AddMove(Move move)
 {
     _currentAlgorithm.Add(move);
     _cube.ExecuteMove(move);
 }