Fix shop action costs and pass semantics.

Only buying costs gold; selling and trading (Triple) are free. Pass is
now a final action, legal only at or under the pet limit: it forfeits
remaining gold and ends that player's shopping for the round, with the
shop closing once everyone has passed. That makes the separate cleanup
phase unreachable (you sell down in-shop before passing), so it is
removed. The client asks for confirmation before passing, and the bot
knows buys are the only coin sink, when passing is legal, and that it
must sell down before it can pass.
This commit is contained in:
Greyson Parrelli
2026-07-23 16:11:07 -04:00
parent db1a6ef290
commit 72e198a750
15 changed files with 273 additions and 297 deletions
+1 -5
View File
@@ -122,11 +122,7 @@ func (s *Server) apply(r *room, c *client, msg clientMessage) {
case "buy":
err = g.Buy(c.playerID, msg.Row)
case "sell":
if g.Phase == game.PhaseCleanup {
err = g.CleanupSell(c.playerID, msg.Cards)
} else {
err = g.Sell(c.playerID, msg.Cards)
}
err = g.Sell(c.playerID, msg.Cards)
case "trade":
err = g.TradeStart(c.playerID, msg.Cards)
case "tradeChoose":