コード例 #1
0
 /// <summary>
 ///		Coloca la partida en un movimiento
 /// </summary>
 private void GoToMovement(MovementFigureViewModel movement)
 {
     // Inicializa el índice de movimientos
     _actualMovementIndex = 0;
     // Limpia el tablero
     GameBoard.Reset();
     PgnGameViewModel.RaiseEventReset();
     // Busca el movimiento
     while (_actualMovementIndex >= 0 && _actualMovementIndex < FigureMovements.Count &&
            _actualMovementIndex < movement.MovementIndex)
     {
         PgnGameViewModel.RaiseEventNextMovement();
     }
 }
コード例 #2
0
 /// <summary>
 ///		Reorre los movimientos hasta encontrar el buscado
 /// </summary>
 internal void MoveTo(MovementFigureViewModel movementFigureViewModel)
 {
     GoToMovement(movementFigureViewModel);
     SelectMovement(movementFigureViewModel.MovementIndex);
 }