PathCosts class

What a path may cross and what each cell costs, the game's say in Pathfinder. The engine knows solids, liquids and fences from the block table; which liquid burns and which floor is slow is the game's.

Constructors

PathCosts({bool avoid(int block) = _never, double liquidCost = 3.0, double floorCost(int floor) = _one})
A policy: never enter a cell where avoid is true, pay liquidCost for a liquid cell and floorCost of the block under the feet for any other.
const

Properties

avoid → bool Function(int block)
True for a block no path may enter, at the feet or at the head (lava).
final
floorCost → double Function(int floor)
The cost of a step onto a cell standing on floor (2 for a floor that halves a walker's speed).
final
hashCode → int
The hash code for this object.
no setterinherited
liquidCost → double
The cost of a step into a liquid cell.
final
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
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

plain → const PathCosts
Every cell costs 1, liquids 3, nothing is avoided.