refactor: format findPath call for improved readability

This commit is contained in:
Marc Emmanuel 2026-01-30 14:30:56 +01:00
parent edb369b4ae
commit e90a2594e0

View file

@ -374,7 +374,12 @@ class RoutesModule {
exit: number; exit: number;
}) { }) {
const getCost = this.createCostEvaluator({ isWater, connections }); const getCost = this.createCostEvaluator({ isWater, connections });
const pathCells = findPath(start, (current) => current === exit, getCost, pack); const pathCells = findPath(
start,
(current) => current === exit,
getCost,
pack,
);
if (!pathCells) return []; if (!pathCells) return [];
const segments = this.getRouteSegments(pathCells, connections); const segments = this.getRouteSegments(pathCells, connections);
return segments; return segments;