#Go Boards with Typst

6 messages · Page 1 of 1 (latest)

left venture
#

Here is a basic implementation of a go board in Typst.
For some reason, I did not want to go to Cetz, so its made with basic lines and circles.

I made a repo here for now, I'll see to make it a package at some point.

#align(center, {
  box(stroke: black, width: 40%, go-board-9(stones: ("ab", "ac", "ef")))
  h(1cm)
  box(stroke: black, width: 40%, go-board(
    size: 5,
    // Stones stay positioned from the top left corner
    stones: ((position: "ac", color: "white"), (position: "bb", skip-numbering: true), "cc", "ed", "ec", "dc"),
    marks: ("db",),
    mark-radius: 5%,
    open-edges: ("left", "bottom"),
    open-edges-added-length: 7%,
    padding: 2mm,
    board-fill: luma(90%),
    black-stone: move(dx: -50%, dy: -50%, circle(
      width: 100%,
      fill: black,
      stroke: white + 0.2pt,
    )),
    white-stone: move(dx: -50%, dy: -50%, circle(
      width: 100%,
      fill: white,
      stroke: black + 0.2pt,
    )),
    stone-diameter-ratio: 0.8,
    add-played-number: true,
  ))
})

#figure(
  {
    set text(size: 15pt, weight: "semibold")
    block(width: 70%, go-board(
      size: 10,
      stones: ("cc", "dd", "dc", "ed", "be", "dg", "fb", "hd"),
      add-played-number: true,
      open-edges: ("right", "bottom"),
      marks: ("dd", "jd"),
    ))
  },
  caption: [Example joseki],
  kind: "goban",
  supplement: [Goban],
)
GitHub

Simple go board implementation for Typst. Contribute to nmielec/lets-go development by creating an account on GitHub.

opal aspen
#

Just amazing. Please publish the package and let us know.

amber valley
#

such a good name

left venture
#

?r ```
#import "@preview/lets-go:0.1.0": go-board-9

#go-board-9(stones: ("ab", "ac", "ef"))

left venture
#

Here it is ! 😁