RoundChangeLifecycleStageEvent to implement the cancellable interface#21
RoundChangeLifecycleStageEvent to implement the cancellable interface#21KieronWiltshire wants to merge 5 commits intocaseif:developfrom KieronWiltshire:develop
Conversation
|
I'm thinking it may be better to have a method such as |
|
Well the purpose of this would be to halt the change event, thus resetting that lifecycle stage. What would be the purpose of |
|
It would expose the same functionality as the current Also, the semantics of cancelling a stage change would need to be considered and documented - should the timer be stopped, or simply keep ticking? I'm personally leaning more towards the latter, but again. that's open to discussion. |
|
Im not sure you fully understand what I propose? The Right now the current implementation only allows a set timer to exist, and once the countdown has completed, the stage is forcibly changed which may be the unwanted action, as previously mentioned, imagine you have a |
|
I understand what you're proposing; I'm just pointing out that That being said, I disagree that the timer should be reset to its initial state, as that would equate to only partial cancellation of the event, which I feel is unintuitive. My question is whether the timer should be stopped, or keep ticking once the event has been cancelled. Also, @jamierocks - any input you could provide on this would be much appreciated. |
|
keep ticking? the minigame isn't over just because a stage in the lifecycle wants to be reset? |
|
Halting the timer doesn't end the minigame; it does just that: halt the timer. Explicit specification of behavior isn't technically possible while still implementing the |
|
hmm, halt the timer then. |
|
The Javadoc needs to be updated to describe the semantics before I can consider a merge. Also, what's your opinion on a boolean flag versus a separate |
|
Lets do it! :) |
Proposal
The RoundChangeLifecycleStageEvent event should implement the
cancellableinterface in order to prevent the round from crossing over to the next stage in the life cycle. The current API restricts a stage to a single state of completion, this being the specified duration of time. It may be a need for some to perform other checks in order to determine whether or not the life cycle is completed.Consider this scenario
Conclusion
Making this simple adjustment to the API would allow these types of scenarios to be carried out with very little effort.