tallHexagonBoard関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A honeycomb a little taller than it is wide, for a phone held upright (John, 2026-10-01: "slightly vertical maps for
the hex"): a hexagon of radius whose widest rows are repeated extra more times down the middle, each row sitting
half a cell along from the last, so the sides run straight down. With no extra rows it is the hexagon itself.
インポート
import { tallHexagonBoard } from "@johnmorrisdotca/tsunagi";
定義
function tallHexagonBoard(radius: number, extra: number): TsunagiBoard
引数
| 名前 | 型 | 説明 |
|---|---|---|
radius | number | The cells from the middle to the side. |
extra | number | The rows added down the middle. |
戻り値
TsunagiBoard
The board as a graph.
例
import { tallHexagonBoard } from "@johnmorrisdotca/tsunagi";
console.log(tallHexagonBoard(3,3).cells.length);53出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。