Skip to content

Commit

Permalink
Change the rating range min/max from 500 to 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
gbtami committed Dec 22, 2024
1 parent b470b0b commit 5a53471
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions client/lobby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ export class LobbyController implements ChatController {
const vByoIdx = (localStorage.seek_byo ?? 1) - 1;
const vDay = localStorage.seek_day ?? "1";
const vRated = vVariant === "bughouse"? "0": localStorage.seek_rated ?? "0";
const vRatingMin = localStorage.seek_rating_min ?? -500;
const vRatingMax = localStorage.seek_rating_max ?? 500;
const vRatingMin = localStorage.seek_rating_min ?? -1000;
const vRatingMax = localStorage.seek_rating_max ?? 1000;
const vLevel = Number(localStorage.seek_level ?? "1");
const vChess960 = localStorage.seek_chess960 ?? "false";
const vRMplay = localStorage.seek_rmplay ?? "false";
Expand Down Expand Up @@ -499,15 +499,15 @@ export class LobbyController implements ChatController {
_('Rating range'),
h('div.rating-range', [
h('input#rating-min.slider', {
props: { name: "rating-min", type: "range", min: -500, max: 0, step: 50, value: vRatingMin },
props: { name: "rating-min", type: "range", min: -1000, max: 0, step: 50, value: vRatingMin },
on: { input: e => this.setRatingMin(parseInt((e.target as HTMLInputElement).value)) },
hook: { insert: vnode => this.setRatingMin(parseInt((vnode.elm as HTMLInputElement).value)) },
}),
h('span.rating-min', '-500'),
'/',
h('span.rating-max', '+500'),
h('input#rating-max.slider', {
props: { name: "rating-max", type: "range", min: 0, max: 500, step: 50, value: vRatingMax },
props: { name: "rating-max", type: "range", min: 0, max: 1000, step: 50, value: vRatingMax },
on: { input: e => this.setRatingMax(parseInt((e.target as HTMLInputElement).value)) },
hook: { insert: vnode => this.setRatingMax(parseInt((vnode.elm as HTMLInputElement).value)) },
}),
Expand Down
1 change: 0 additions & 1 deletion server/pychess_global_app_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ async def init_from_db(self):
# Load auto pairings from database
async for doc in self.db.autopairing.find():
variant_tc = tuple(doc["variant_tc"])
print(variant_tc)
if variant_tc not in self.auto_pairings:
self.auto_pairings[variant_tc] = set()

Expand Down
4 changes: 2 additions & 2 deletions server/seek.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def __init__(
self.fen = "" if fen is None else fen
self.rated = rated
self.rating = creator.get_rating(variant, chess960).rating_prov[0]
self.rrmin = rrmin if (rrmin is not None and rrmin != -500) else -10000
self.rrmax = rrmax if (rrmax is not None and rrmax != 500) else 10000
self.rrmin = rrmin if (rrmin is not None and rrmin != -1000) else -10000
self.rrmax = rrmax if (rrmax is not None and rrmax != 1000) else 10000
self.base = base
self.inc = inc
self.byoyomi_period = byoyomi_period
Expand Down

0 comments on commit 5a53471

Please sign in to comment.