From af88dce12b3bf140bba6bfb4bc08fb440cd42627 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 26 Mar 2024 20:34:57 +0100 Subject: get position from containing permanent --- go/game/permanent.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'go') diff --git a/go/game/permanent.go b/go/game/permanent.go index dfa275a6..99d70831 100644 --- a/go/game/permanent.go +++ b/go/game/permanent.go @@ -89,9 +89,9 @@ func FmtPermanent(p Permanent) string { return fmt.Sprintf("%s%v", typeIndicator, p.Tile().Position) } - for i, p := range containing.Pile() { - if p == p { - return fmt.Sprintf("%s%v[%d]", typeIndicator, p.Tile().Position, i+1) + for i, piled := range containing.Pile() { + if piled == p { + return fmt.Sprintf("%s%v[%d]", typeIndicator, containing.Tile().Position, i+1) } } -- cgit v1.2.3