diff --git a/ngochess/gtp/gtp.go b/ngochess/gtp/gtp.go index 55000b9..4e9591a 100644 --- a/ngochess/gtp/gtp.go +++ b/ngochess/gtp/gtp.go @@ -327,12 +327,13 @@ func (e *GtpEngine) SetFreeHandicap(vexArr ...string) bool { // Sync 同步 // handicaps: points of all handicaps // plays: [][2]string -> [["B","A1"]] -func (e *GtpEngine) Sync(size int, komi float64, handicaps []string, plays [][]string) bool { +func (e *GtpEngine) Sync(size int, komi float64, level int, handicaps []string, plays [][]string) bool { // 1. komi // 2. boardsize - // 3. clear_board - // 4. set_free_handicap pos1 pos2 ... - // 5~n. play X XX + // 3. set_level + // 4. clear_board + // 5. set_free_handicap pos1 pos2 ... + // 6~n. play X XX playAllFn := func() bool { return narr.Every(plays, func(_ int, v []string) bool { @@ -346,6 +347,7 @@ func (e *GtpEngine) Sync(size int, komi float64, handicaps []string, plays [][]s return e.Komi(komi) && e.BoardSize(size) && + e.SetLevel(level) && e.ClearBoard() && e.SetFreeHandicap(handicaps...) && playAllFn()