Skip to content

Commit 2b08b04

Browse files
committed
[bugfix] Do not halt game on prepared event when in STOP
1 parent a2c35ea commit 2b08b04

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/app/controller/engine.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,12 @@ func (e *Engine) Continue() {
227227
e.SendCommand(e.State.NextCommand, e.State.NextCommandFor)
228228
} else {
229229
log.Println("No next command available to continue with. Halting game.")
230-
e.SendCommand(CommandHalt, "")
230+
if e.State.Command != CommandStop {
231+
// halt the game, if not in STOP.
232+
// Rational: After ball placement and no next command, halt the game to indicate that manual action is required
233+
// If in STOP, that was most likely triggered manually already and a suddenly halted game might be confusing and not intended
234+
e.SendCommand(CommandHalt, "")
235+
}
231236
}
232237
}
233238

0 commit comments

Comments
 (0)