diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-12-27 12:40:19 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-01-27 16:43:58 +0100 |
| commit | 4e2ab55d345fd5e5c5d2d5bc56948611b15564d5 (patch) | |
| tree | c6998ac54687c442ad0baa541edd0fbf917b1308 /go/game/permanent.go | |
| parent | 5aa8e7ddbc41aed55e7918e6afaec0b5c07fa510 (diff) | |
| download | muhqs-game-4e2ab55d345fd5e5c5d2d5bc56948611b15564d5.tar.gz muhqs-game-4e2ab55d345fd5e5c5d2d5bc56948611b15564d5.zip | |
introduce game.State interface abstraction
This allows to not use the internal game state directly from client
code.
Diffstat (limited to 'go/game/permanent.go')
| -rw-r--r-- | go/game/permanent.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/go/game/permanent.go b/go/game/permanent.go index 99d70831..47166d61 100644 --- a/go/game/permanent.go +++ b/go/game/permanent.go @@ -99,14 +99,14 @@ func FmtPermanent(p Permanent) string { return "" } -func FindPermanent(s *State, desc string) Permanent { +func FindPermanent(s *LocalState, desc string) Permanent { var pos Position _, err := fmt.Sscanf(desc[1:strings.Index(desc, ")")], POSITION_FMT, &pos.X, &pos.Y) if err != nil { log.Panicf("desc %q not a valid permanent description", desc) } - p := s.Map.TileAt(pos).Permanent + p := s.Map().TileAt(pos).Permanent return p } |
