diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-07-24 12:17:26 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-07-28 18:03:10 +0200 |
| commit | 749dc58ced17662d9f6dd40bb44d315d12d3d48b (patch) | |
| tree | 170a957d296dc82467310b7b22f66d2ad440dff7 /go/game/map.go | |
| parent | ce875a8454265ac4a17be25eeaa6e0b136936a56 (diff) | |
| download | muhqs-game-749dc58ced17662d9f6dd40bb44d315d12d3d48b.tar.gz muhqs-game-749dc58ced17662d9f6dd40bb44d315d12d3d48b.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) |
