Skip to content

Commit 4c23dae

Browse files
committed
format
1 parent e1a1b96 commit 4c23dae

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

lib/JumperGraphSolver/jumper-graph-generator/createProblemFromBaseGraph.ts

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ const getRandomPerimeterPoint = (
128128
}
129129

130130
// Fallback to last side (shouldn't happen due to floating point)
131-
return getPointOnSide(bounds, allowedSides[allowedSides.length - 1], random())
131+
return getPointOnSide(
132+
bounds,
133+
allowedSides[allowedSides.length - 1],
134+
random(),
135+
)
132136
}
133137

134138
const perimeter = 2 * width + 2 * height
@@ -215,7 +219,11 @@ export const createProblemFromBaseGraph = ({
215219
// Try to find a valid start point
216220
let start: { x: number; y: number } | null = null
217221
for (let tryCount = 0; tryCount < 100; tryCount++) {
218-
const candidate = getRandomPerimeterPoint(graphBounds, random, allowedSides)
222+
const candidate = getRandomPerimeterPoint(
223+
graphBounds,
224+
random,
225+
allowedSides,
226+
)
219227
if (isValidPoint(candidate, allPoints)) {
220228
start = candidate
221229
break
@@ -230,7 +238,11 @@ export const createProblemFromBaseGraph = ({
230238
// Try to find a valid end point
231239
let end: { x: number; y: number } | null = null
232240
for (let tryCount = 0; tryCount < 100; tryCount++) {
233-
const candidate = getRandomPerimeterPoint(graphBounds, random, allowedSides)
241+
const candidate = getRandomPerimeterPoint(
242+
graphBounds,
243+
random,
244+
allowedSides,
245+
)
234246
if (isValidPoint(candidate, allPoints)) {
235247
end = candidate
236248
break

scripts/run-benchmark-4x4-1206x4-two-sided.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ console.log(
5555
`Graph size (horizontal): ${hWidth.toFixed(1)}x${hHeight.toFixed(1)}mm`,
5656
)
5757

58-
console.log("Benchmark: 4x4 1206x4 Jumper Grid Solver (Two-Sided Points, Both Orientations)")
58+
console.log(
59+
"Benchmark: 4x4 1206x4 Jumper Grid Solver (Two-Sided Points, Both Orientations)",
60+
)
5961
console.log("=".repeat(50))
6062
console.log(
6163
`Testing ${MIN_CROSSINGS}-${MAX_CROSSINGS} connections with ${SAMPLES_PER_CROSSING_COUNT} samples each\n`,

0 commit comments

Comments
 (0)