diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-07-24 12:17:26 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:30 +0200 |
| commit | 1db9bf77e011afba4f4ca6d0b98e766eb9701375 (patch) | |
| tree | 6ec38d9e6df4d060519fb1db4ab0f590969a8dec /go/game/map.go | |
| parent | 18fbd176c73e7102528d6ddce8353476d000d386 (diff) | |
| download | muhqs-game-1db9bf77e011afba4f4ca6d0b98e766eb9701375.tar.gz muhqs-game-1db9bf77e011afba4f4ca6d0b98e766eb9701375.zip | |
add random challange aupport to the client
Diffstat (limited to 'go/game/map.go')
| -rw-r--r-- | go/game/map.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/go/game/map.go b/go/game/map.go index 2b0bebd7..be541cdd 100644 --- a/go/game/map.go +++ b/go/game/map.go @@ -285,6 +285,12 @@ func (m *Map) FreeTiles() []*Tile { return m.FilterTiles(func(t *Tile) bool { return t.IsFree() }) } +func (m *Map) AvailableTilesFor(c *Card) []*Tile { + return m.FilterTiles(func(t *Tile) bool { + return t.IsAvailableForCard(c) + }) +} + func (m *Map) distributeStoreCards(cards PileOfCards, rand *rand.Rand) { nStores := len(m.Stores) stores := make([]*Store, 0, nStores) |
