Minor Server cleanups
parent
8c72455d21
commit
8342a07869
|
@ -23,7 +23,7 @@ final class Server(repo: GameRepo, ai: Ai) {
|
|||
(newChessGame, move) = newChessGameAndMove
|
||||
g3 = g2.update(newChessGame, move)
|
||||
g4 ← if (g3.player.isAi) aiResponse(g3) else success(g3)
|
||||
result ← unsafe { repo save g4 }
|
||||
_ ← unsafe { repo save g4 }
|
||||
} yield newChessGame.situation.destinations
|
||||
|
||||
private def aiResponse(dbGame: DbGame): Valid[DbGame] = for {
|
||||
|
@ -31,8 +31,6 @@ final class Server(repo: GameRepo, ai: Ai) {
|
|||
(newChessGame, move) = newChessGameAndMove
|
||||
} yield dbGame.update(newChessGame, move)
|
||||
|
||||
private def moveToEvents(move: Move): Map[DbPlayer, EventStack] = Map.empty
|
||||
|
||||
private def decodeMoveString(moveString: String): Option[(String, String)] =
|
||||
moveString match {
|
||||
case MoveString(orig, dest) ⇒ (orig, dest).some
|
||||
|
|
Loading…
Reference in New Issue