Skip to content

Commit 0b1f3e4

Browse files
committed
[bugfix] Halt the game when trying to continue without next command
1 parent 4166c77 commit 0b1f3e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/app/controller/engine.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ func (e *Engine) Continue() {
188188
e.SendCommand(CommandHalt, "")
189189
} else if e.State.NextCommand != CommandUnknown {
190190
e.SendCommand(e.State.NextCommand, e.State.NextCommandFor)
191+
} else {
192+
log.Println("No next command available to continue with. Halting game.")
193+
e.SendCommand(CommandHalt, "")
191194
}
192195
}
193196

0 commit comments

Comments
 (0)