diff --git a/README.md b/README.md index 7624f4e..472d1b9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,10 @@ Pull or download the `master` branch Then to produce a `lczero-client` executable: `go build lc0_main.go` for the `lc0` client +If you get +`.\lc0_main.go:1048:5: undefined: chess.GetLibraryVersion` +you have a cached old version of Tilps/chess and need to run the Pre-reqs again. + # Running First copy the `lc0` executable into the same folder as the `lczero-client` executable. @@ -52,4 +56,4 @@ Building the client for each platform: GOOS=windows GOARCH=amd64 go build -o lczero-client.exe GOOS=darwin GOARCH=amd64 go build -o lczero-client_mac GOOS=linux GOARCH=amd64 go build -o lczero-client_linux -``` +``` \ No newline at end of file diff --git a/lc0_main.go b/lc0_main.go index 59505c2..54521a1 100644 --- a/lc0_main.go +++ b/lc0_main.go @@ -1043,16 +1043,9 @@ func nextGame(httpClient *http.Client, count int) error { return errors.New("Unknown game type: " + nextGame.Type) } -// Check if PGN may contain "e.p." to verify that the chess package is recent -func testEP() { - game := chess.NewGame(chess.UseNotation(chess.AlgebraicNotation{})) - game.MoveStr("a4") - game.MoveStr("c5") - game.MoveStr("a5") - game.MoveStr("b5") - game.MoveStr("axb6") - - if strings.Contains(game.String(), "e.p.") { +// Ensure Tilps/chess is new enough. +func testChessVersion() { + if chess.GetLibraryVersion() < 3 { log.Fatal("You need a more recent version of package github.com/Tilps/chess") } } @@ -1086,7 +1079,7 @@ func maybeSetTrainOnly() { func main() { fmt.Printf("Lc0 client version %v\n", getExtraParams()["version"]) - testEP() + testChessVersion() hideLc0argsFlag() flag.Parse()