mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Modernise to bonus +=.
This commit is contained in:
parent
3b921faa61
commit
b2052c91aa
1 changed files with 4 additions and 4 deletions
|
@ -306,16 +306,16 @@ class DefaultHint(AbstractHint):
|
|||
bonus = self.BONUS_DROP_CARD
|
||||
if t.cards and t.cards[-1].suit == pile[0].suit:
|
||||
# simple heuristics - prefer moving high-rank cards
|
||||
bonus = bonus + self.BONUS_SAME_SUIT_MOVE + (1 + pile[0].rank)
|
||||
bonus += self.BONUS_SAME_SUIT_MOVE + (1 + pile[0].rank)
|
||||
elif self._preferHighRankMoves():
|
||||
# simple heuristics - prefer moving high-rank cards
|
||||
bonus = bonus + self.BONUS_NORMAL_MOVE + (1 + pile[0].rank)
|
||||
bonus += self.BONUS_NORMAL_MOVE + (1 + pile[0].rank)
|
||||
elif rpile:
|
||||
# simple heuristics - prefer low-rank cards in rpile
|
||||
bonus = bonus + self.BONUS_NORMAL_MOVE + (self.K - rpile[-1].rank)
|
||||
bonus += self.BONUS_NORMAL_MOVE + (self.K - rpile[-1].rank)
|
||||
else:
|
||||
# simple heuristics - prefer moving high-rank cards
|
||||
bonus = bonus + self.BONUS_NORMAL_MOVE + (1 + pile[0].rank)
|
||||
bonus += self.BONUS_NORMAL_MOVE + (1 + pile[0].rank)
|
||||
return bonus
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue