public override bool Execute(bool isSimualtion = false) { bool valid = false; if (Validate()) { APawn allyPawn = CurPlayer.GetPawnAt(AllyPos); Dijkstra didi = new Dijkstra(Boards.GetBoard(), AllyPos, allyPawn.MovePoints); List <Coord> moveRange = didi.GetValidPaths(Command.MOVE); if (moveRange.Contains(Target)) { valid = true; allyPawn.Erase(Boards); allyPawn.Position = Target; allyPawn.Place(Boards); allyPawn.Adapt(Boards.TerrainAt(AllyPos), Boards.TerrainAt(Target)); } else { ErrorMsg = OUT_OF_RANGE; } } if (!ErrorMsg.Equals("") && !isSimualtion) { UserUtils.PrintError(ErrorMsg); Console.ReadLine(); } return(valid); }