aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2025-08-15 23:50:26 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2025-08-17 15:24:25 +0200
commit3092ae48144fba0b6282989f6c939e687d213dde (patch)
treed62559e344af31fb79291dcb5d09e6bdadb91f74
parente9a5673bb006c43aa20971657994a2ed304d7028 (diff)
downloadmuhqs-game-3092ae48144fba0b6282989f6c939e687d213dde.tar.gz
muhqs-game-3092ae48144fba0b6282989f6c939e687d213dde.zip
format permanents without a tile
This is relevant during pile drops for example.
-rw-r--r--go/game/permanent.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/go/game/permanent.go b/go/game/permanent.go
index 051e0f74..5c105724 100644
--- a/go/game/permanent.go
+++ b/go/game/permanent.go
@@ -99,6 +99,9 @@ func FmtPermanent(p Permanent) string {
containing := p.ContainingPerm()
if containing == nil {
+ if p.Tile() == nil {
+ return p.Card().Name
+ }
return fmt.Sprintf("%s%v", typeIndicator, p.Tile().Position)
}