Goal<T> class abstract interface Pathfinding

Represents a goal in a pathfinding algorithm.

A goal is a condition that, when met, signals the end of a pathfinding algorithm. For example, a goal could be a specific node in a graph, or a condition that a node must meet to be considered a goal, such as a certain value or property.

Constructors

Goal.always()
Creates a goal that always matches any node.
const
factory
Goal.any(List<Goal<T>> goals)
Creates a goal that matches any of the goals in goals.
const
factory
Goal.every(List<Goal<T>> goals)
Creates a goal that matches all of the goals in goals.
const
factory
Goal.never()
Creates a goal that never matches any node.
const
factory
Goal.node(T node)
Creates a goal that matches a specific node.
const
factory
Goal.test(bool success(T node))
Creates a goal with an arbitrary condition that a node must meet.
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
success(T node) bool
Returns true if node is a goal, false otherwise.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited