aboutsummaryrefslogtreecommitdiff
path: root/go/game/map.go
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-02-07 14:58:22 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2023-02-07 15:35:16 +0100
commitc98dd8aacd47eb3732392f41c412b3f54036ef3d (patch)
treec0882a6a5257eccae53679f1e1d4f795af3e3cce /go/game/map.go
parent6bd6936e1aae2fb8d2f5fc95d3c8dcdbe799242d (diff)
downloadmuhqs-game-c98dd8aacd47eb3732392f41c412b3f54036ef3d.tar.gz
muhqs-game-c98dd8aacd47eb3732392f41c412b3f54036ef3d.zip
intermediate commit
* implement most of the kraken cards * unify permanent marks * add state based actions hook for card implementations
Diffstat (limited to 'go/game/map.go')
-rw-r--r--go/game/map.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/go/game/map.go b/go/game/map.go
index 2115e0b0..b86debad 100644
--- a/go/game/map.go
+++ b/go/game/map.go
@@ -269,6 +269,10 @@ func (m *Map) AllTiles() []*Tile {
return m.FilterTiles(func(*Tile) bool { return true })
}
+func (m *Map) FreeTiles() []*Tile {
+ return m.FilterTiles(func(t *Tile) bool { return t.IsFree() })
+}
+
func (m *Map) distributeStoreCards(cards PileOfCards, rand *rand.Rand) {
nStores := len(m.Stores)
stores := make([]*Store, 0, nStores)