aboutsummaryrefslogtreecommitdiff
path: root/go/game/player.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-15 16:41:29 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:50 +0100
commitf9fef6046fdc6895d5eaa7fc15d9b4f4a02becae (patch)
tree7f3ffdd01af02d60c78ea65bafa75384cf140aac /go/game/player.go
parent0edb119b497bf1283f976693b02e044033d4de08 (diff)
downloadmuhqs-game-f9fef6046fdc6895d5eaa7fc15d9b4f4a02becae.tar.gz
muhqs-game-f9fef6046fdc6895d5eaa7fc15d9b4f4a02becae.zip
replace Fatalf with Panicf
Panicf includes a stacktrace and causes a debugger to halt.
Diffstat (limited to 'go/game/player.go')
-rw-r--r--go/game/player.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/go/game/player.go b/go/game/player.go
index a69f2cd3..802cafeb 100644
--- a/go/game/player.go
+++ b/go/game/player.go
@@ -153,14 +153,14 @@ func (p *Player) PromptHandCardSelection(min, max int) []*Card {
case *TargetSelection:
err := a.CheckTargets(p.gameState)
if err != nil {
- log.Fatalf("Invalid hand card selection: %v", err)
+ log.Panicf("Invalid hand card selection: %v", err)
}
return utils.InterfaceSliceToTypedSlice[*Card](a.Target().sel)
case *PassPriority:
return nil
default:
- log.Fatalf("Unexpected response type %T for hand card selection", a)
+ log.Panicf("Unexpected response type %T for hand card selection", a)
}
return nil
}