Skip to content

Commit

Permalink
upgrade scalachess
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Nov 3, 2017
1 parent 9a13931 commit db94586
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion conf/base.conf
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ plan {
patron = plan_patron
charge = plan_charge
}
monthly_goal = 4971
monthly_goal = 5008
}
hub {
actor {
Expand Down
4 changes: 2 additions & 2 deletions modules/explorer/src/main/ExplorerIndexer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package lila.explorer

import scala.util.Random.nextFloat
import scala.util.{ Try, Success, Failure }

import org.joda.time.DateTime
import org.joda.time.format.DateTimeFormat
import play.api.libs.iteratee._
import play.api.libs.ws.WS
import play.api.Play.current
import chess.format.pgn.Tag

import lila.db.dsl._
import lila.game.BSONHandlers.gameBSONHandler
Expand Down Expand Up @@ -153,7 +153,7 @@ private final class ExplorerIndexer(
usernames.find(_.toLowerCase == id)
} orElse game.player(color).userId getOrElse "?"
val fenTags = initialFen.?? { fen => List(s"[FEN $fen]") }
val timeControl = game.clock.fold("-") { c => s"${c.limit}+${c.increment}" }
val timeControl = Tag.timeControl(game.clock.map(_.config)).value
val otherTags = List(
s"[LichessID ${game.id}]",
s"[Variant ${game.variant.name}]",
Expand Down
2 changes: 1 addition & 1 deletion modules/game/src/main/PgnDump.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ final class PgnDump(
wu.flatMap(_.title).map { t => Tag(_.WhiteTitle, t) },
bu.flatMap(_.title).map { t => Tag(_.BlackTitle, t) },
Tag(_.Variant, game.variant.name.capitalize).some,
Tag(_.TimeControl, game.clock.fold("-") { c => s"${c.limit.roundSeconds}+${c.increment.roundSeconds}" }).some,
Tag.timeControl(game.clock.map(_.config)).some,
Tag(_.ECO, game.opening.fold("?")(_.opening.eco)).some,
Tag(_.Opening, game.opening.fold("?")(_.opening.name)).some,
Tag(_.Termination, {
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object Dependencies {
val findbugs = "com.google.code.findbugs" % "jsr305" % "3.0.1"
val hasher = "com.roundeights" %% "hasher" % "1.2.0"
val jodaTime = "joda-time" % "joda-time" % "2.9.9"
val chess = "org.lichess" %% "scalachess" % "7.1"
val chess = "org.lichess" %% "scalachess" % "7.2"
val maxmind = "com.sanoma.cda" %% "maxmind-geoip2-scala" % "1.2.3-THIB"
val prismic = "io.prismic" %% "scala-kit" % "1.2.11-THIB"
val java8compat = "org.scala-lang.modules" %% "scala-java8-compat" % "0.8.0"
Expand Down

0 comments on commit db94586

Please sign in to comment.