fix AI play outofbook detection
parent
b404824b3f
commit
8fbf30ef59
|
@ -44,11 +44,9 @@ final private class FishnetOpeningBook(
|
||||||
case res =>
|
case res =>
|
||||||
for {
|
for {
|
||||||
data <- res.body[JsValue].validate[Response](responseReader).asOpt
|
data <- res.body[JsValue].validate[Response](responseReader).asOpt
|
||||||
|
_ = if (data.moves.isEmpty) outOfBook.put(game.id)
|
||||||
move <- data.randomPonderedMove
|
move <- data.randomPonderedMove
|
||||||
} yield {
|
} yield move.uci
|
||||||
if (data.moves.isEmpty) outOfBook.put(game.id)
|
|
||||||
move.uci
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.monTry { res =>
|
.monTry { res =>
|
||||||
_.fishnet
|
_.fishnet
|
||||||
|
|
Loading…
Reference in New Issue