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 {
295
295
e .updateStage (e .State .Stage .Next ())
296
296
} else if s .StageOperation == StagePrevious {
297
297
e .updateStage (e .State .Stage .Previous ())
298
+ } else if s .StageOperation == StageEndGame {
299
+ e .updateStage (StagePostGame )
298
300
} else {
299
301
return errors .Errorf ("Unknown stage operation: %v" , s .StageOperation )
300
302
}
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ const (
35
35
StageNext StageOperation = "next"
36
36
// StagePrevious previous stage
37
37
StagePrevious StageOperation = "previous"
38
+ // StageEndGame ends the game
39
+ StageEndGame StageOperation = "endGame"
38
40
)
39
41
40
42
// TriggerType is something that can be triggered
Original file line number Diff line number Diff line change 29
29
:disabled =" forbidMatchControls || noNextStage" >
30
30
Next Stage
31
31
</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 >
32
37
</div >
33
38
</template >
34
39
66
71
' stage' : {' stageOperation' : ' next' }
67
72
})
68
73
},
74
+ endGame : function () {
75
+ this .$socket .sendObj ({
76
+ ' stage' : {' stageOperation' : ' endGame' }
77
+ })
78
+ },
69
79
},
70
80
computed: {
71
81
state () {
You can’t perform that action at this time.
0 commit comments