File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,8 @@ func (e *Engine) processStage(s *EventStage) error {
295295 e .updateStage (e .State .Stage .Next ())
296296 } else if s .StageOperation == StagePrevious {
297297 e .updateStage (e .State .Stage .Previous ())
298+ } else if s .StageOperation == StageEndGame {
299+ e .updateStage (StagePostGame )
298300 } else {
299301 return errors .Errorf ("Unknown stage operation: %v" , s .StageOperation )
300302 }
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ const (
3535 StageNext StageOperation = "next"
3636 // StagePrevious previous stage
3737 StagePrevious StageOperation = "previous"
38+ // StageEndGame ends the game
39+ StageEndGame StageOperation = "endGame"
3840)
3941
4042// TriggerType is something that can be triggered
Original file line number Diff line number Diff line change 2929 :disabled =" forbidMatchControls || noNextStage" >
3030 Next Stage
3131 </b-button >
32+ <b-button v-b-tooltip.hover title =" Finish the game"
33+ v-on:click =" endGame"
34+ :disabled =" forbidMatchControls || noNextStage" >
35+ End of Game
36+ </b-button >
3237 </div >
3338</template >
3439
6671 ' stage' : {' stageOperation' : ' next' }
6772 })
6873 },
74+ endGame : function () {
75+ this .$socket .sendObj ({
76+ ' stage' : {' stageOperation' : ' endGame' }
77+ })
78+ },
6979 },
7080 computed: {
7181 state () {
You can’t perform that action at this time.
0 commit comments