commit b9b9107811619c379c3549559269423749ed64a5
parent 51af15ecda2847a21046447d48b229536b4f3250
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Sun, 18 Jun 2023 00:02:08 -0700
time based
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pkg/web/handlers/interceptors/chess.go b/pkg/web/handlers/interceptors/chess.go
@@ -1013,8 +1013,8 @@ func AnalyzeGame(gg *ChessGame, pgn string) (out AnalyzeResult, err error) {
scores := make([]Score, 0)
cps := make([]int, 0)
- //t := 15
- //moveTime := time.Duration((float64(t)/float64(len(positions)-1))*1000) * time.Millisecond
+ t := 15
+ moveTime := time.Duration((float64(t)/float64(len(positions)-1))*1000) * time.Millisecond
for idx, position := range positions {
// First position is the board without any move played
@@ -1022,7 +1022,7 @@ func AnalyzeGame(gg *ChessGame, pgn string) (out AnalyzeResult, err error) {
continue
}
cmdPos := uci.CmdPosition{Position: position}
- cmdGo := uci.CmdGo{Depth: 20}
+ cmdGo := uci.CmdGo{MoveTime: moveTime}
if err := eng.Run(cmdPos, cmdGo); err != nil {
logrus.Error(err)
mov := g.MoveHistory()[idx-1].Move