public static bool CheckIfValid(PathfindingSettings s) { if (s == null) { return(false); } if (s.FromX < 0 || s.FromY < 0) { return(false); } if (s.FromX == s.GoalX && s.FromY == s.GoalY) { return(false); } return(HeuristicSearch.RegisteredAlgorithms.ContainsKey(s.Algorithm)); }
public bool CheckIfPathfindingSettingsValid(PathfindingSettings s) { return(s != null && s.FromX != X && s.FromY != Y && s.GoalX != X && s.GoalY != Y); }