Skip to content

Commit

Permalink
game search fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Mar 14, 2016
1 parent 48d2fbb commit d8b7d88
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
10 changes: 10 additions & 0 deletions modules/gameSearch/src/main/Clocking.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package lila.gameSearch

case class Clocking(
initMin: Option[Int] = None,
initMax: Option[Int] = None,
incMin: Option[Int] = None,
incMax: Option[Int] = None) {

def nonEmpty = initMin.isDefined || initMax.isDefined || incMin.isDefined || incMax.isDefined
}
2 changes: 1 addition & 1 deletion modules/gameSearch/src/main/Query.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ object Query {
) ::: options(List(60 * 1, 60 * 2, 60 * 3, 60 * 5, 60 * 10, 60 * 15, 60 * 20, 60 * 30, 60 * 60, 60 * 90, 60 * 120, 60 * 150, 60 * 180), _ / 60, "%d minute{s}").toList

val clockIncs =
options(List(0, 1, 2, 3, 5, 10, 15, 20, 30, 60, 90, 120, 150, 180), "%d seconds{s}").toList
options(List(0, 1, 2, 3, 5, 10, 15, 20, 30, 60, 90, 120, 150, 180), "%d second{s}").toList

val winnerColors = List(1 -> "White", 2 -> "Black", 3 -> "None")

Expand Down
9 changes: 0 additions & 9 deletions modules/gameSearch/src/main/Sorting.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,3 @@ object Sorting {

val default = Sorting(Fields.date, "desc")
}

case class Clocking(
initMin: Option[Int] = None,
initMax: Option[Int] = None,
incMin: Option[Int] = None,
incMax: Option[Int] = None) {

def nonEmpty = initMin.isDefined || initMax.isDefined || incMin.isDefined || incMax.isDefined
}

0 comments on commit d8b7d88

Please sign in to comment.