Class MoveTree

Constructors

Properties

active_path_number: number = 0
branches: MoveTree[]
chat_log?: MoveTreeChatLine[]
correct_answer: boolean = false
edited: boolean
engine: GobanEngine
hint_next?: MoveTree
id: number
isobranch_hash?: string
isobranches: any
label: string = "[unset]"
label_metrics?: any
layout_cx: number = 0
layout_cy: number = 0
layout_x: number = 0
layout_y: number = 0
line_color: number
marks?: MarkInterface[][]
move_number: number
parent: null | MoveTree
pen_marks: MoveTreePenMarks = []
played_by: undefined | number
player_update: undefined | JGOFPlayerSummary
pretty_coordinates: string
stashed_marks: MarkInterface[][][] = []
text: string
trunk: boolean
trunk_next?: MoveTree
wrong_answer: boolean = false
x: number
y: number
active_path_number: number = 0

** Layout & Rendering ***

current_line_color: number = 0
isobranch_colors: {
    strong: string;
    weak: string;
} = ...

Type declaration

  • strong: string
  • weak: string
line_colors: string[] = ...
stone_padding: 3 = 3
stone_radius: 11 = 11
stone_square_size: number = ...

Accessors

  • get stoneColor(): "black" | "white" | "empty"
  • Returns "black" | "white" | "empty"

Methods

  • Calls a callback for each positions that has a mark on it

    Parameters

    • fn: ((i, j) => void)
        • (i, j): void
        • Parameters

          • i: number
          • j: number

          Returns void

    Returns void

  • Returns true if there are any marks that have been set

    Returns boolean

  • Parameters

    • x: number
    • min_y: number
    • layout_hash: {
          [coords: string]: MoveTree;
      }
    • line_color: number

    Returns number

  • Recomputes the isobranches for the entire tree. This needs to be called on the root node.

    Returns void

  • Saves the current marks in our stash, restore them with popMarks

    Returns void