reformats

pull/6001/head
Thibault Duplessis 2020-02-08 11:16:44 -06:00
parent d307eb40a2
commit 178a716db1
3 changed files with 39 additions and 8 deletions

View File

@ -18,10 +18,41 @@ trait SetupHelper { self: I18nHelper =>
("0.5", "½", none),
("0.75", "¾", none)
) ::: List(
// format: OFF
"1", "1.5", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18",
"19", "20", "25", "30", "35", "40", "45", "60", "75", "90", "105", "120", "135", "150", "165", "180"
// format: ON
"1",
"1.5",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
"13",
"14",
"15",
"16",
"17",
"18",
"19",
"20",
"25",
"30",
"35",
"40",
"45",
"60",
"75",
"90",
"105",
"120",
"135",
"150",
"165",
"180"
).map { v =>
(v.toString, v.toString, none)
}

View File

@ -30,9 +30,9 @@ object RageSit {
import chess.variant._
(game.chess.board.materialImbalance, game.variant) match {
case (_, Crazyhouse | Horde) => 0
case (a, _) if a >= 4 => 1
case (a, _) if a <= -4 => -1
case _ => 0
case (a, _) if a >= 4 => 1
case (a, _) if a <= -4 => -1
case _ => 0
}
} * {
if (loser.white) 1 else -1

View File

@ -67,6 +67,6 @@ final private class DuelStore {
if (tb.size <= 1) byTourId.remove(tourId)
else byTourId.put(tourId, tb.filter(_.gameId != game.id))
}
def remove(tour: Tournament): Unit = byTourId.remove(tour.id)
}