Skip to the content

Narabe並べ

Play forty-eight abstract board games through immutable moves, legal choices and replayable records.

Narabe means arranging in Japanese, as in gomoku-narabe: five in a row. About the name

Contents

Reference · Rules and records

Handicaptype

Extra restrictions one colour plays under, so a stronger player can give a weaker one a fair game. Every item is a rule some variant already imposes on a colour, applied here on top of whatever the variant says. A handicap belongs to a colour, not a seat, so seat swaps are off while one is set.

doubleThree / doubleFour / overline: shapes this colour may not make. exactLine: this colour's overline is not a win. openLine: this colour's winning line must not be shut in at both ends. longerLine: this colour needs one more stone in a row. singleStone: one stone a turn where the variant gives two. noCaptures: this colour does not capture, in the capture variants. secondStoneExclusion: this colour's second stone must land outside the central square of this half-width (2 for 5×5, 3 for 7×7); 0 for none.

Import it

import type { Handicap } from "@johnmorrisdotca/narabe";

Definition

type Handicap = {
    stone: Stone | null;
    doubleThree: boolean;
    doubleFour: boolean;
    overline: boolean;
    exactLine: boolean;
    openLine: boolean;
    longerLine: boolean;
    singleStone: boolean;
    noCaptures: boolean;
    secondStoneExclusion: number;
};

Members

NameTypeDescription
stoneStone | null
doubleThreeboolean
doubleFourboolean
overlineboolean
exactLineboolean
openLineboolean
longerLineboolean
singleStoneboolean
noCapturesboolean
secondStoneExclusionnumber

Examples

import type { Handicap } from "@johnmorrisdotca/narabe";
import { NO_HANDICAP } from "@johnmorrisdotca/narabe";

const value: Handicap = {...NO_HANDICAP,stone:"black",doubleThree:true};
console.log(value);
{
  stone: 'black',
  doubleThree: true,
  doubleFour: false,
  overline: false,
  exactLine: false,
  openLine: false,
  longerLine: false,
  singleStone: false,
  noCaptures: false,
  secondStoneExclusion: 0
}

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/narabe 1.3.0.