예제 #1
0
    public static float GetEstimate(this IMove move, Graph graph, int steps)
    {
        move.ChangeGraph(graph);
        //TODO: implement best enemy move and check
//        graph.DoSteps(steps);
        return(graph.DoSteps(steps).EvalCostFunction());
    }
예제 #2
0
    public static float GetEstimate(this IMove move, Graph graph, int steps)
    {
        move.ChangeGraph(graph);
//Console.Error.Write("GT:"+graph.Troops.Count+".S:"+steps);
//foreach (var tr in graph.Troops)Console.Error.WriteLine($"   {tr.Src} - > {tr.Dst}({tr.DstInCommand}) No-{tr.Size} d-"+tr.Remaining);
        //TODO: implement best enemy move and check
//        graph.DoSteps(steps);
        if (move is MultiMove)
        {
            Console.Error.Write(" MC:" + ((MultiMove)move).moves.Count + " ");
        }
        return(graph.DoSteps(steps).EvalCostFunction());
    }