code tweaks
This commit is contained in:
parent
9f9fd389cb
commit
acf2ff07ef
|
@ -80,7 +80,7 @@ private[round] object History {
|
|||
coll.byId[Bdoc](gameId).map {
|
||||
_.flatMap(_.getAs[VersionedEvents]("e")) ?? (_.reverse)
|
||||
} addEffect {
|
||||
case events if events.nonEmpty && !withPersistence => coll.remove($doc("_id" -> gameId)).void
|
||||
case events if events.nonEmpty && !withPersistence => coll.remove($id(gameId)).void
|
||||
case _ =>
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ trait Positional { self: Config =>
|
|||
}
|
||||
|
||||
def fenGame(builder: ChessGame => Game): Game = {
|
||||
val baseState = fen ifTrue (variant == FromPosition) flatMap {
|
||||
val baseState = fen ifTrue (variant.fromPosition) flatMap {
|
||||
Forsyth.<<<@(FromPosition, _)
|
||||
}
|
||||
val (chessGame, state) = baseState.fold(makeGame -> none[SituationPlus]) {
|
||||
|
|
Loading…
Reference in a new issue