From 749dc58ced17662d9f6dd40bb44d315d12d3d48b Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 24 Jul 2025 12:17:26 -0400 Subject: add random challange aupport to the client --- go/game/map.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'go/game/map.go') 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) -- cgit v1.2.3