On every turn she shuffles her cards.
Shen then tries each in order.
- If she finds a card that is legally playable, she plays it.
+ If she finds a card that is legally playable, she plays it--
+ unless it's redundant (plays hazards only when stopped, plays
+ speed limit only if you don't already have one)
If she finds no legally playable cards, she discards a card at random.
(She will never discard a safety, because safeties are always legally playable.)
She extends if half the cards remain in the draw pile.
- playee = self.other() if isinstance(card, Hazard) else self
+ if not isinstance(card, Hazard):
+ if card is speed_limit:
+ if not playee.hand.autobahn():
+ if not playee.hand.rolling():
print(" du-uh, played", card, "on", "herself" if playee == self else "you")
if self.hand.won() and self.hand.mileage() == 700: