Skip to content

Commit 53c2683

Browse files
committed
[bugfix] Reset placement position when continuing game
1 parent d47a01d commit 53c2683

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

internal/app/controller/engine.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ func (e *Engine) SendCommand(command RefCommand, forTeam Team) {
5757
e.State.CommandFor = forTeam
5858
e.LogCommand()
5959

60-
if command.ContinuesGame() && len(e.State.GameEvents) > 0 {
61-
e.State.GameEvents = []*GameEvent{}
60+
if command.ContinuesGame() {
61+
if len(e.State.GameEvents) > 0 {
62+
e.State.GameEvents = []*GameEvent{}
63+
}
64+
e.State.PlacementPos = nil
6265
}
6366
}
6467

0 commit comments

Comments
 (0)