Clear hash on new game in CECP
authorFabian Fichter <ianfab@users.noreply.github.com>
Wed, 19 Feb 2020 18:58:37 +0000 (19:58 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 19 Feb 2020 18:58:37 +0000 (19:58 +0100)
Ensures reproducible results on repeated searches, e.g.:
```
xboard
new
go
new
go
```

Closes #80.

src/xboard.cpp

index fdadf22..69e7252 100644 (file)
@@ -122,6 +122,7 @@ void StateMachine::process_command(Position& pos, std::string token, std::istrin
   }
   else if (token == "new")
   {
+      Search::clear();
       setboard(pos, states);
       // play second by default
       playColor = ~pos.side_to_move();