diplicity
diplicity copied to clipboard
Added server side grace period support.
- Added two fields to Game:
GracePeriodMinutes
andGracePeriodsPerPlayer
. - Added one field to GameMember:
GracePeriodsUsed
. - Added one field to PhaseMeta (present both anonymously in Phase and as Game.NewestPhaseMeta):
GraceUsed
. - Made phase resolution check grace period settings, and if
GracePeriodMinutes
> 0,GracePeriodsPerPlayer
> 0, latest phase!GraceUsed
, and at least one player with no orders, and not ready to resolve hasGracePeriodsUsed
<GracePeriodsPerPlayer
they will have theirGracePeriodsUsed
bumped, the current phase will haveGraceUsed
set to true, be postponed, and the late players will be named and shamed in a message to the conference channel.
@JorenC, @tttppp, @johnpooch PTAL
Also, this is not yet tested - I wanted to get a sanity check by visual inspection first.
The logic looks right to me. This will allow a player to use all their grace periods on the same phase, but I think that's ok.
We should have a way to know in the client whether we're in a grace period.
I think we keep the current phase, so it would be "Spring 1902 (grace)". I think we keep the current deadline (it has just been extended), so the deadline is fine.
We do need:
- A token that we're currently in Grace.
- A way to know which of the players is in Grace (especially me)
We should have a way to know in the client whether we're in a grace period.
I added Phase.GraceUsed which will show this.
I think we keep the current phase, so it would be "Spring 1902 (grace)".
I don't understand - when grace period is used the current phase will just be extended.
I think we keep the current deadline (it has just been extended), so the deadline is fine.
Yes, exactly.
We do need:
- A token that we're currently in Grace.
This is in the PR now.
- A way to know which of the players is in Grace (especially me)
Why? You are not committed and need to commit, isn't that enough?