Add support for up to 6 players.

This commit is contained in:
Greyson Parrelli
2026-07-28 07:36:09 -04:00
parent e542118175
commit a4f5f6910d
38 changed files with 2306 additions and 713 deletions
+3 -4
View File
@@ -88,7 +88,7 @@ func (cx *ctx) applyTemplateShopEffects(deck []game.Card, c game.Card, trigger g
// with a sampled card of the current tier.
pool := cx.unseenPool(cx.v.Round)
if len(pool) == 0 {
pool = game.TierContentsForPack(cx.v.Pack, cx.v.Round)
pool = game.TierContentsForPacks(cx.v.Packs, cx.v.Round)
}
if len(pool) > 0 {
rc := pool[rand.IntN(len(pool))]
@@ -126,7 +126,7 @@ func (cx *ctx) applyTemplateShopEffects(deck []game.Card, c game.Card, trigger g
deck = slices.Delete(deck, worst, worst+1)
pool := cx.unseenPool(nextTier)
if len(pool) == 0 {
pool = game.TierContentsForPack(cx.v.Pack, nextTier)
pool = game.TierContentsForPacks(cx.v.Packs, nextTier)
}
if len(pool) > 0 {
rc := pool[rand.IntN(len(pool))]
@@ -370,7 +370,7 @@ func (b *Bot) decideShop(v *game.View, mem *Memory) *Action {
}
pool := cx.unseenPool(v.Round + 1)
if len(pool) == 0 {
pool = game.TierContentsForPack(v.Pack, v.Round+1)
pool = game.TierContentsForPacks(v.Packs, v.Round+1)
}
var decks [][]game.Card
for range 3 {
@@ -409,4 +409,3 @@ func (b *Bot) decideTradeChoose(v *game.View, mem *Memory) *Action {
b.score(cx, cands)
return b.pick(cands).act
}