/// <summary> /// Camino más corto desde el niño al corral /// </summary> /// <param name="chPos"></param> /// <returns></returns> protected List <Point> MinPathToPlaypen(Point chPos, Func <Point, bool> rule = null) { var emptyPlaypen = Environment.GetEmptyPlaypen(p => Environment[p].CurrentStatus == CellStatus.Empty || Environment[p].CurrentStatus == CellStatus.Robot); //Lista de las casillas del corral que están vacías var paths = (List <List <Point> >)Environment.Paths(chPos, emptyPlaypen, rule); return(MinPath(paths)); }