Delegate MovementValidator
ENGINE LAYER: Pathfinding system for multi-province unit movement
Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps.
Features:
- IMovementCostCalculator for terrain/ownership-based costs
- PathOptions for forbidden zones and avoid preferences
- LRU path caching for repeated requests
- Burst path when using uniform costs (fast)
- Managed path with custom costs (flexible)
Performance:
- Burst: O(E log V) with binary heap, ~0.1ms typical
- Pre-allocated collections, zero gameplay allocations
- LRU cache reduces redundant searches
public delegate bool MovementValidator(ushort provinceID, ushort unitOwnerCountryID, ushort unitTypeID)
Parameters
provinceIDushort- ENGINE LAYER: Pathfinding system for multi-province unit movement Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps. Features: IMovementCostCalculator for terrain/ownership-based costs PathOptions for forbidden zones and avoid preferences LRU path caching for repeated requests Burst path when using uniform costs (fast) Managed path with custom costs (flexible) Performance: Burst: O(E log V) with binary heap, ~0.1ms typical Pre-allocated collections, zero gameplay allocations LRU cache reduces redundant searches
unitOwnerCountryIDushort- ENGINE LAYER: Pathfinding system for multi-province unit movement Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps. Features: IMovementCostCalculator for terrain/ownership-based costs PathOptions for forbidden zones and avoid preferences LRU path caching for repeated requests Burst path when using uniform costs (fast) Managed path with custom costs (flexible) Performance: Burst: O(E log V) with binary heap, ~0.1ms typical Pre-allocated collections, zero gameplay allocations LRU cache reduces redundant searches
unitTypeIDushort- ENGINE LAYER: Pathfinding system for multi-province unit movement Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps. Features: IMovementCostCalculator for terrain/ownership-based costs PathOptions for forbidden zones and avoid preferences LRU path caching for repeated requests Burst path when using uniform costs (fast) Managed path with custom costs (flexible) Performance: Burst: O(E log V) with binary heap, ~0.1ms typical Pre-allocated collections, zero gameplay allocations LRU cache reduces redundant searches
Returns
- bool
- ENGINE LAYER: Pathfinding system for multi-province unit movement Uses A* algorithm to find shortest path between provinces. Burst-compiled for high performance with large maps. Features: IMovementCostCalculator for terrain/ownership-based costs PathOptions for forbidden zones and avoid preferences LRU path caching for repeated requests Burst path when using uniform costs (fast) Managed path with custom costs (flexible) Performance: Burst: O(E log V) with binary heap, ~0.1ms typical Pre-allocated collections, zero gameplay allocations LRU cache reduces redundant searches