1 line
3.2 KiB
JavaScript
1 line
3.2 KiB
JavaScript
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('<p><a href="./../../../../">Profectus</a> / <a href="./../">game/boards/board</a> / placeInAvailableSpace</p><h1 id="function-placeinavailablespace" tabindex="-1">Function: placeInAvailableSpace() <a class="header-anchor" href="#function-placeinavailablespace" aria-label="Permalink to "Function: placeInAvailableSpace()""></a></h1><blockquote><p><strong>placeInAvailableSpace</strong><<code>T</code>>(<code>nodeToPlace</code>, <code>nodes</code>, <code>radius</code>, <code>direction</code>): <code>void</code></p></blockquote><p>Moves a node so that it is sufficiently far away from any other nodes, to prevent overlapping.</p><h2 id="type-parameters" tabindex="-1">Type Parameters <a class="header-anchor" href="#type-parameters" aria-label="Permalink to "Type Parameters""></a></h2><p>• <strong>T</strong> <em>extends</em> <a href="./../type-aliases/NodePosition"><code>NodePosition</code></a></p><h2 id="parameters" tabindex="-1">Parameters <a class="header-anchor" href="#parameters" aria-label="Permalink to "Parameters""></a></h2><h3 id="nodetoplace" tabindex="-1">nodeToPlace <a class="header-anchor" href="#nodetoplace" aria-label="Permalink to "nodeToPlace""></a></h3><p><code>T</code></p><p>The node to find a spot for, with it's current/preffered position.</p><h3 id="nodes" tabindex="-1">nodes <a class="header-anchor" href="#nodes" aria-label="Permalink to "nodes""></a></h3><p><code>T</code>[]</p><p>The list of nodes to make sure nodeToPlace is far enough away from.</p><h3 id="radius" tabindex="-1">radius <a class="header-anchor" href="#radius" aria-label="Permalink to "radius""></a></h3><p><code>number</code> = <code>100</code></p><p>How far away nodeToPlace must be from any other nodes.</p><h3 id="direction" tabindex="-1">direction <a class="header-anchor" href="#direction" aria-label="Permalink to "direction""></a></h3><p><a href="./../../../../util/common/enumerations/Direction"><code>Direction</code></a> = <code>Direction.Right</code></p><p>The direction to push the nodeToPlace until it finds an available spot.</p><h2 id="returns" tabindex="-1">Returns <a class="header-anchor" href="#returns" aria-label="Permalink to "Returns""></a></h2><p><code>void</code></p><h2 id="defined-in" tabindex="-1">Defined in <a class="header-anchor" href="#defined-in" aria-label="Permalink to "Defined in""></a></h2><p><a href="https://code.incremental.social/profectus/Profectus/src/branch/main/src/game/boards/board.tsx#L406" target="_blank" rel="noreferrer">profectus/src/game/boards/board.tsx:406</a></p>',23)]))}const f=a(n,[["render",i]]);export{u as __pageData,f as default};
|