func cfgEngines(eng *uci.Engine, cfg *UCIEngine) {
	optHash := uci.CmdSetOption{Name: "hash", Value: fmt.Sprintf("%v", cfg.Hash)}
	optPonder := uci.CmdSetOption{Name: "ponder", Value: fmt.Sprintf("%v", cfg.Ponder)}
	optOwnBook := uci.CmdSetOption{Name: "ownbook", Value: fmt.Sprintf("%v", cfg.OwnBook)}
	optMultiPV := uci.CmdSetOption{Name: "multipv", Value: fmt.Sprintf("%v", cfg.MultiPV)}
	uciArgs := []uci.Cmd{uci.CmdUCI, uci.CmdIsReady, optHash, optPonder, optOwnBook, optMultiPV, uci.CmdUCINewGame}
	// Send any custom options that were specified
	for _, option := range cfg.Options {
		uciArgs = append(uciArgs, uci.CmdSetOption{Name: option.Name, Value: option.Value})
	}

	if err := eng.Run(uciArgs...); err != nil {
		panic(err)
	}
}
// cfgEngines configures the UCI engine
cfgEngines configures the UCI engine
// cfgEngines configures the UCI engine
func cfgEngines(eng *uci.Engine, cfg *UCIEngine) {
	optHash := uci.CmdSetOption{Name: "hash", Value: fmt.Sprintf("%v", cfg.Hash)}
	optPonder := uci.CmdSetOption{Name: "ponder", Value: fmt.Sprintf("%v", cfg.Ponder)}
	optOwnBook := uci.CmdSetOption{Name: "ownbook", Value: fmt.Sprintf("%v", cfg.OwnBook)}
	optMultiPV := uci.CmdSetOption{Name: "multipv", Value: fmt.Sprintf("%v", cfg.MultiPV)}
	uciArgs := []uci.Cmd{uci.CmdUCI, uci.CmdIsReady, optHash, optPonder, optOwnBook, optMultiPV, uci.CmdUCINewGame}
	for _, option := range cfg.Options {
		uciArgs = append(uciArgs, uci.CmdSetOption{Name: option.Name, Value: option.Value})
	}
	if err := eng.Run(uciArgs...); err != nil {
		panic(err)
	}
}
func cfgEngines ( eng * uci . Engine , cfg * UCIEngine ) { optHash := uci . CmdSetOption { Name : " " , Value : fmt . Sprintf ( " " , cfg . Hash ) } optPonder := uci . CmdSetOption { Name : " " , Value : fmt . Sprintf ( " " , cfg . Ponder ) } optOwnBook := uci . CmdSetOption { Name : " " , Value : fmt . Sprintf ( " " , cfg . OwnBook ) } optMultiPV := uci . CmdSetOption { Name : " " , Value : fmt . Sprintf ( " " , cfg . MultiPV ) } uciArgs := [ ] uci . Cmd { uci . CmdUCI , uci . CmdIsReady , optHash , optPonder , optOwnBook , optMultiPV , uci . CmdUCINewGame } for _ , option := range cfg . Options { uciArgs = append ( uciArgs , uci . CmdSetOption { Name : option . Name , Value : option . Value } ) } if err := eng . Run ( uciArgs ... ) ; err != nil { panic ( err ) } }
cfgEngines configures the UCI engine
cfgEngines configures the UCI engine
// Send any custom options that were specified