Commits

Larry Hastings  committed 5c656f3

If Norman is one card away from winning, he tries not to discard it.

  • Participants
  • Parent commits e5fd92b

Comments (0)

Files changed (1)

 
 		# mileage
 		if mileage:
-			debug("P8.b")
-			self.discard(mileage[0])
-			return
+			# if we're one card away from winning,
+			# don't discard it here
+			if card_to_win in mileage:
+				debug("P8.b.1")
+				mileage.remove(card_to_win)
+			if mileage:
+				debug("P8.b.2")
+				self.discard(mileage[0])
+				return
 
 		# remedies of which you have only one
 		if remedies: