aboutsummaryrefslogtreecommitdiff
path: root/go/game/permanent.go
diff options
context:
space:
mode:
Diffstat (limited to 'go/game/permanent.go')
-rw-r--r--go/game/permanent.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/go/game/permanent.go b/go/game/permanent.go
index ecc4459a..f211179b 100644
--- a/go/game/permanent.go
+++ b/go/game/permanent.go
@@ -206,3 +206,12 @@ func leaveTile(p Permanent) {
p.SetTile(nil)
}
}
+
+func TileOrContainingPermTile(p Permanent) *Tile {
+ tile := p.Tile()
+ if tile == nil {
+ tile = p.ContainingPerm().Tile()
+ }
+
+ return tile
+}