fix AI play outofbook detection

deepcrayonfish^2
Thibault Duplessis 2021-11-23 08:31:36 +01:00
parent b404824b3f
commit 8fbf30ef59
1 changed files with 2 additions and 4 deletions

View File

@ -44,11 +44,9 @@ final private class FishnetOpeningBook(
case res =>
for {
data <- res.body[JsValue].validate[Response](responseReader).asOpt
_ = if (data.moves.isEmpty) outOfBook.put(game.id)
move <- data.randomPonderedMove
} yield {
if (data.moves.isEmpty) outOfBook.put(game.id)
move.uci
}
} yield move.uci
}
.monTry { res =>
_.fishnet