Exemplo n.º 1
0
        public override bool GoalSatisfied(State state)
        {
            GridState gridState = (GridState)state;

            return(gridState.position == endPosition);
        }
Exemplo n.º 2
0
        public override double EstimateCost(State state)
        {
            GridState gridState = (GridState)state;

            return(Vector2.ManhattanDistance(gridState.position, gridGoal.endPosition));
        }