make new evaluator module compile
This commit is contained in:
parent
69ad4b5deb
commit
0188077231
|
@ -8,7 +8,6 @@ import lila.common.PimpedConfig._
|
|||
import lila.game.actorApi.ChangeFeaturedGame
|
||||
import lila.hub.actorApi.map.Ask
|
||||
import lila.socket.actorApi.GetVersion
|
||||
import lila.user.Evaluator
|
||||
import makeTimeout.large
|
||||
|
||||
final class Env(
|
||||
|
|
|
@ -5,7 +5,7 @@ import akka.pattern.{ ask, pipe }
|
|||
|
||||
import actorApi._
|
||||
import lila.hub.actorApi.map.Tell
|
||||
import lila.hub.actorApi.round.FinishGame
|
||||
import lila.game.actorApi.FinishGame
|
||||
import lila.hub.actorApi.WithUserIds
|
||||
import makeTimeout.short
|
||||
|
||||
|
@ -36,8 +36,8 @@ private[tournament] final class Organizer(
|
|||
reminder ! RemindTournaments(tours)
|
||||
}
|
||||
|
||||
case FinishGame(gameId) ⇒
|
||||
api finishGame gameId foreach { _ map (_.id) foreach api.socketReload }
|
||||
case FinishGame(game, _, _) ⇒
|
||||
api finishGame game foreach { _ map (_.id) foreach api.socketReload }
|
||||
}
|
||||
|
||||
private def startPairing(tour: Started) {
|
||||
|
|
|
@ -114,8 +114,7 @@ private[tournament] final class TournamentApi(
|
|||
case finished: Finished ⇒ fufail("Cannot withdraw from finished tournament " + finished.id)
|
||||
}
|
||||
|
||||
def finishGame(gameId: String): Fu[Option[Tournament]] = for {
|
||||
game ← optionT(GameRepo finished gameId)
|
||||
def finishGame(game: Game): Fu[Option[Tournament]] = for {
|
||||
tour ← optionT(game.tournamentId ?? TournamentRepo.startedById)
|
||||
result ← optionT {
|
||||
val tour2 = tour.updatePairing(game.id, _.finish(game.status, game.winnerUserId, game.turns))
|
||||
|
|
Loading…
Reference in a new issue