"""Sample policy for the Taffy four-player Dou Dizhu API.""" def choose_action(state): if state.get("phase") == "bidding": return {"action": "bid", "amount": 1 if state.get("my_seat") == state.get("first_bidder") else 0} hand = state.get("hand", []) previous = state.get("last_play") return {"action": "play", "cards": hand[:1]} if not previous and hand else {"action": "pass"}