0+1 variant games are unrated - closes #8441
parent
1657c7f33f
commit
19063d7062
|
@ -681,7 +681,10 @@ object Game {
|
|||
|
||||
def allowRated(variant: Variant, clock: Option[Clock.Config]) =
|
||||
variant.standard || {
|
||||
clock ?? { _.estimateTotalTime >= Centis(3000) }
|
||||
clock ?? { c =>
|
||||
c.estimateTotalTime >= Centis(3000) &&
|
||||
c.limitSeconds > 0 || c.incrementSeconds > 1
|
||||
}
|
||||
}
|
||||
|
||||
val gameIdSize = 8
|
||||
|
|
|
@ -152,8 +152,7 @@ export default class Setup {
|
|||
limit = parseFloat($timeInput.val() as string),
|
||||
inc = parseFloat($incrementInput.val() as string),
|
||||
// no rated variants with less than 30s on the clock
|
||||
cantBeRated =
|
||||
(timeMode == '1' && variantId != '1' && limit < 0.5 && inc == 0) || (variantId != '1' && timeMode != '1');
|
||||
cantBeRated = variantId != '1' && (timeMode != '1' || (limit < 0.5 && inc == 0) || (limit == 0 && inc < 2));
|
||||
if (cantBeRated && rated) {
|
||||
$casual.trigger('click');
|
||||
return toggleButtons();
|
||||
|
|
Loading…
Reference in New Issue