Example #1
0
 public static void Check()
 {
     GOAPConsoleWriter.WriteBlanks();
     GOAPConsoleWriter.WriteActions();
     GOAPConsoleWriter.WriteBlanksUsingBy();
     CheckForNotUsing();
     CheckActionsForEmpty();
 }
Example #2
0
        public static void ConstructBest(string goalKey)
        {
            var context  = new GOAPStateContext(GOAPConxtextFactory.ScholarContext, GOAPConxtextFactory.ClassContext);
            var comparer = new BaseCostComparer();

            var planer = new GOAPPlanner(context, comparer);

            if (!planer.TryGetBestPlan(GOAPGoalsManager.Instance.Goals[goalKey], out var plan))
            {
                throw new Exception("Мы проебались!");
            }

            Console.ForegroundColor = ConsoleColor.Magenta;
            GOAPConsoleWriter.WritePlan(plan);
            Console.ResetColor();
        }
Example #3
0
        public static void ConstructAllBest(string goalKey)
        {
            var context  = new GOAPStateContext(GOAPConxtextFactory.ScholarContext, GOAPConxtextFactory.ClassContext);
            var comparer = new BaseCostComparer();

            var planer = new GOAPPlanner(context, comparer);


            if (!planer.TryGetAllBestPlans(GOAPGoalsManager.Instance.Goals[goalKey], out var plans))
            {
                throw new Exception("Мы проебались!");
            }


            GOAPConsoleWriter.WritePlans(plans);
        }