chore: some changes and run prettier everywhere

This commit is contained in:
Antonio De Lucreziis
2024-03-14 21:25:00 +01:00
parent 182238f89d
commit f16e340fd2
9 changed files with 62 additions and 45 deletions
+2 -2
View File
@@ -275,14 +275,14 @@ const DIR_AVAILABLE_PREDICATE: Record<WireDirection, (pos: Point2, grid: Grid<Wi
function pruneDirections(
grid: Grid<WireCell>,
position: Point2,
directions: WireDirection[]
directions: WireDirection[],
): WireDirection[] {
return directions.filter(dir => DIR_AVAILABLE_PREDICATE[dir](position, grid))
}
function generateWire(
grid: Grid<WireCell>,
startingPoint: Point2
startingPoint: Point2,
): { position: Point2; direction: WireCell }[] {
const segmentLength = Math.floor(1 - Math.random() ** 2) * 10 + 30
let currentPosition = startingPoint