func (gc *movetreeConverter) move(mv *move.Move) Move {
	return Move{string(mv.Color()), gc.point(mv.Point())}
}
move converts from a movetree-move to a move-array with a GTP Point. This is a
format peculiar to Katago.
package katago
import (
	"encoding/json"
	"fmt"
	"math"
	"strconv"
	"github.com/google/uuid"
	"github.com/otrego/clamshell/core/move"
	"github.com/otrego/clamshell/core/movetree"
	"github.com/otrego/clamshell/core/point"
)
type Query struct {
	ID string `json:"id"`
	InitialStones []Move `json:"initialStones,omitempty"`
	InitialPlayer string `json:"initialPlayer,omitempty"`
	Moves []Move `json:"moves"`
	Rules Rules `json:"rules"`
	Komi *float64 `json:"komi,omitempty"`
	BoardXSize int `json:"boardXSize,omitempty"`
	BoardYSize int `json:"boardYSize,omitempty"`
	AnalyzeTurns []int `json:"analyzeTurns,omitempty"`
	MaxVisits *int `json:"maxVisits,omitempty"`
	OverrideSettings map[string]interface{} `json:"overrideSettings,omitempty"`
}
func NewQuery() *Query {
	return &Query{
		ID:               uuid.New().String(),
		Rules:            TrompTaylorRules,
		OverrideSettings: make(map[string]interface{}),
	}
}
type Move [2]string
type Rules string
const (
	TrompTaylorRules Rules = "tromp-taylor"
	ChineseRules Rules = "chinese"
	ChineseOGSRules Rules = "chinese-ogs"
	NewZealandRules Rules = "new-zealand"
	Japanese Rules = "japanese"
)
func (q *Query) ToJSON() ([]byte, error) {
	return json.Marshal(q)
}
type movetreeConverter struct {
	g *movetree.MoveTree
}
func (gc *movetreeConverter) point(pt *point.Point) string {
	if pt == nil {
		return "pass"
	}
	const a = 'A'
	const i = 'I'
	val := rune(a + pt.X())
	if val >= i {
		val++
	}
	return fmt.Sprintf("%c%d", val, pt.Y()+1)
}