/// <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(); } }
/// <summary> /// Reorre los movimientos hasta encontrar el buscado /// </summary> internal void MoveTo(MovementFigureViewModel movementFigureViewModel) { GoToMovement(movementFigureViewModel); SelectMovement(movementFigureViewModel.MovementIndex); }