import{_ as a,c as o,a0 as r,o as t}from"./chunks/framework.P9qPzDnn.js";const u=JSON.parse('{"title":"Function: placeInAvailableSpace()","description":"","frontmatter":{"editLink":false},"headers":[],"relativePath":"api/game/boards/board/functions/placeInAvailableSpace.md","filePath":"api/game/boards/board/functions/placeInAvailableSpace.md","lastUpdated":null}'),n={name:"api/game/boards/board/functions/placeInAvailableSpace.md"};function i(d,e,c,s,l,p){return t(),o("div",null,e[0]||(e[0]=[r('

Profectus / game/boards/board / placeInAvailableSpace

Function: placeInAvailableSpace()

placeInAvailableSpace<T>(nodeToPlace, nodes, radius, direction): void

Moves a node so that it is sufficiently far away from any other nodes, to prevent overlapping.

Type Parameters

T extends NodePosition

Parameters

nodeToPlace

T

The node to find a spot for, with it's current/preffered position.

nodes

T[]

The list of nodes to make sure nodeToPlace is far enough away from.

radius

number = 100

How far away nodeToPlace must be from any other nodes.

direction

Direction = Direction.Right

The direction to push the nodeToPlace until it finds an available spot.

Returns

void

Defined in

profectus/src/game/boards/board.tsx:406

',23)]))}const f=a(n,[["render",i]]);export{u as __pageData,f as default};