Skip to content

Conversation

@drybalka
Copy link
Contributor

@drybalka drybalka commented Mar 25, 2023

Implements one of the suggestions in #6554
And probably solves #6410

This adds an option to add extra time per player on the simul screen.

@drybalka
Copy link
Contributor Author

I could probably also change SimulClock.hostExtraTime into LimitMinutes, but I did not want to touch more code than necessary in my first issue =)

@ornicar
Copy link
Collaborator

ornicar commented Mar 27, 2023

Thanks! This looks pretty good. But could you please change it to seconds instead of minutes? I feel like we're going to need that soon, so better get the DB format right from the get go.

@drybalka
Copy link
Contributor Author

I don't feel there's a sensible difference between LimitSeconds and IncrementSeconds (or any other seconds for that matter). Imho it would have been better to have simply Clock.Seconds and Clock.Minutes types with conversions between them. Or even better some kind of universal Time class with to/from methods to both Seconds and Minutes.

@ornicar
Copy link
Collaborator

ornicar commented Mar 28, 2023

I don't feel there's a sensible difference between LimitSeconds and IncrementSeconds (or any other seconds for that matter).

But there is. One should only be used for initial time, and the other only for increment. Having the distinction increases type safety and prevents bugs, now and after future refactorings.

ornicar added 4 commits March 28, 2023 17:15
* master:
  Update TR Dictionary
  /api/player/top/1/standard for mobile app
  add /api/player/top/1/all for mobile app
  tweak leaderboard list API code
  fix storm result posting
  POST /storm with oauth
  GET /api/storm anon or oauth
  Update ru Dictionary
  refer to SECURITY.md on github (lichess-org#12581)
  New Crowdin updates (lichess-org#12567)
  fix path to font file on oops page
  make grid areas more readable
  remove scalatags.me
  Verify website on Mastodon
  Update joda-time to 2.12.4
  add POST /api/streak/:score API endpoint
  add GET /api/streak endpoint
@ornicar ornicar merged commit 679f7bb into lichess-org:master Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants