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-20 15:57:39 +0200
commit3147be8b9829e9012512d7d78cf8b98f1f414d65 (patch)
tree184d8a9dadd587411bd55bdda3247916f0443df2
parent9a0e003c823115baeaf3d9b2b7d3f3b74df8b096 (diff)
downloadmuhqs-game-3147be8b9829e9012512d7d78cf8b98f1f414d65.tar.gz
muhqs-game-3147be8b9829e9012512d7d78cf8b98f1f414d65.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)
}