mwg API
    Preparing search index...

    Function goScore

    • Stones on the board plus surrounded empty territory, per side - area scoring, not the Japanese rule set's separate prisoner count.

      Parameters

      Returns { black: number; white: number }

      import { startingGo, playGo, goScore } from '@datamoc/mw_games/board';

      const state = startingGo(9);
      playGo(state, 4, 4);
      console.log(goScore(state)); // { black: 1, white: 0 } - one stone, no territory settled yet