diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-02-15 16:41:29 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:50:10 +0200 |
| commit | 45c75899632d7ff14e9e32f073d7a3ace7e1230f (patch) | |
| tree | 1a5d4df030c61908d228f3f43bda4057decffaef /go/game/state.go | |
| parent | f369b11bd584c5ec22a4e8e009fbac54101813ce (diff) | |
| download | muhqs-game-45c75899632d7ff14e9e32f073d7a3ace7e1230f.tar.gz muhqs-game-45c75899632d7ff14e9e32f073d7a3ace7e1230f.zip | |
replace Fatalf with Panicf
Panicf includes a stacktrace and causes a debugger to halt.
Diffstat (limited to 'go/game/state.go')
| -rw-r--r-- | go/game/state.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/go/game/state.go b/go/game/state.go index a5a9de82..7fa6e1bf 100644 --- a/go/game/state.go +++ b/go/game/state.go @@ -107,7 +107,7 @@ func (s *State) stateBasedActions() { func (s *State) IsValidPlay(a *PlayAction) error { if s.ActivePhase != Phases.ActionPhase { - log.Fatalf("Play actions can only be declared during one's actions phase") + log.Panicf("Play actions can only be declared during one's actions phase") } if a.Card.IsPermanent() { @@ -219,7 +219,7 @@ func (s *State) ValidateAction(a Action) (err error) { func (s *State) pushAction(a Action) { if !a.PayCosts(s) { - log.Fatalf("Cost for %s could not be paid", a) + log.Panicf("Cost for %s could not be paid", a) } s.Stack.push(a) @@ -458,7 +458,7 @@ func (s *State) WaterSpawnTiles(p *Player) []*Tile { func (s *State) AvailableSpawnTiles(p *Player, c *Card) []*Tile { if !c.IsPermanent() { - log.Fatalf("AvailableSpawnTiles called for %s", c.Type.String()) + log.Panicf("AvailableSpawnTiles called for %s", c.Type.String()) } candidates := c.Impl.spawnTiles(s, p) |
