private bool onPreviousActionCommand(CommandBase command) { Console.WriteLine("onPreviousActionCommand"); if (command is PreviousActionCommand) { PreviousActionCommand previousActionCommand = command as PreviousActionCommand; if (previousActionCommand.IsEnemyAi) { if (Model.GetBoard().Any(x => x.Any(y => y == MyChessType))) { //todo hard code TotalTurn -= 2; Model.PreviousAction(); Model.PreviousAction(); View.RemoveLastChess(); View.RemoveLastChess(); onMyTurn(); } else { Console.WriteLine("Not exit my chess,cant regret"); } } else { TotalTurn--; Model.PreviousAction(); View.RemoveLastChess(); RoleMgr.PreviousPlayer(); } return(true); } else { Console.WriteLine("command is not PreviousActionCommand"); return(false); } }