Commits

larry  committed 745e3b6

If we're checking to see if there are any legal moves yet,
suppress the double_check prompts.

  • Participants
  • Parent commits 75cef78

Comments (0)

Files changed (1)

 	def pile(self, playee):
 		return playee.hand.mileage_pile
 
-	def is_legal(self, player, playee):
+	def is_legal(self, player, playee, silent=False):
 		self.must_draw_first(player)
 		self.not_on_other(player, playee)
 		self.playee_is_not_rolling(player, playee)
 	distance = 50
 
 class HighMileage(Mileage):
-	def is_legal(self, player, playee):
-		super().is_legal(player, playee)
+	def is_legal(self, player, playee, silent=False):
+		super().is_legal(player, playee, silent)
 		if self.on_discard(playee):
 			return
 		if not playee.hand.autobahn():
 class Mileage200(HighMileage):
 	distance = 200
 
-	def is_legal(self, player, playee):
-		super().is_legal(player, playee)
+	def is_legal(self, player, playee, silent=False):
+		super().is_legal(player, playee, silent)
 		if self.on_discard(playee):
 			return
 		if playee.hand.two_hundreds() == 2:
 			and (len(playee.hand.hand) == 6)
 			)
 
-	def is_legal(self, player, playee):
+	def is_legal(self, player, playee, silent=False):
 		self.not_on_discard(playee)
 		self.not_on_other(player, playee)
 
 		if self.safety in playee.hand.safeties:
 			self.illegal(", playee is protected by " + str(self.safety))
 
-	def is_legal(self, player, playee):
+	def is_legal(self, player, playee, silent=False):
 		self.is_legal_base(player, playee)
 		if self.on_discard(playee):
 			return
 			and (top is not roll)
 			):
 			self.illegal(", can't play a hazard on a remedy (" + str(top) + ") (unless they've played the safety)")
-		elif isinstance(top, Hazard):
+		elif isinstance(top, Hazard) and not silent:
 			player.double_check(self, top)
 
 
 	def pile(self, playee):
 		return playee.hand.speed_pile
 
-	def is_legal(self, player, playee):
+	def is_legal(self, player, playee, silent=False):
 		self.is_legal_base(player, playee)
 
 		if self.on_discard(playee):
 			return
 
 		top = playee.hand.normalized_speed_top()
-		if isinstance(top, SpeedLimit):
+		if isinstance(top, SpeedLimit) and not silent:
 			player.double_check(self, top)
 
 
 	def pile(self, playee):
 		return playee.hand.battle_pile
 
-	def is_legal(self, player, playee):
+	def is_legal(self, player, playee, silent=False):
 		self.must_draw_first(player)
 		self.not_on_other(player, playee)
 		self.playee_is_protected(playee)
 	safety_class = RightOfWay
 	hazard_class = Stop
 
-	def is_legal(self, player, playee):
+	def is_legal(self, player, playee, silent=False):
 		self.must_draw_first(player)
 		self.not_on_other(player, playee)
 
 	def discard(self, card):
 		self.play(card, series.discard)
 
-	def is_legal(self, card, playee=None):
+	def is_legal(self, card, playee=None, silent=False):
 		playee = playee or self.player
-		to_card[card].is_legal(self.player, playee)
+		to_card[card].is_legal(self.player, playee, silent)
 
 	def play(self, card, playee=None):
 		card = to_card[card]
 					for card in player.hand.hand:
 						playee = other if isinstance(card, Hazard) else player
 						try:
-							player.hand.is_legal(card, playee)
+							player.hand.is_legal(card, playee, silent=True)
 							playable = card
 							break
 						except IllegalMove: