From 80a2208f501587413a5035047b97fec36bbb800c Mon Sep 17 00:00:00 2001 From: Joe R Date: Thu, 2 Jun 2022 17:57:10 -0400 Subject: [PATCH] Fixed incorrect rules for Amazons game. --- html-src/rules/amazons.html | 31 +++++++++++++++++++++++++++++++ pysollib/games/auldlangsyne.py | 5 +++-- 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 html-src/rules/amazons.html diff --git a/html-src/rules/amazons.html b/html-src/rules/amazons.html new file mode 100644 index 00000000..20fc7c57 --- /dev/null +++ b/html-src/rules/amazons.html @@ -0,0 +1,31 @@ +

Amazons

+

+Numerica type. 1 stripped deck. Unlimited redeals. + +

Object

+

+Move all cards to the foundations. + +

Rules

+

+Amazons is played with only the Aces and Sevens through +queens of each suit. The remaining cards are removed. +

+A card is dealt to each of four tableau piles. No building +on the tableau is allowed - cards can only be moved from the +tableau to foundations. The foundations are built up by rank, +regardless of suit, with the sevens played on the aces. With +the exception of the aces and queens, a card can only be moved +to the foundation from the tableau pile directly below it. +

+Once the talon is empty, you can pick up the tableau piles and +combine them to form a new talon. You can do this as many +times as necessary. +

+Once a foundation is filled, cards are no longer dealt to the +tableau pile directly below it. The game is won if all the +cards are moved to the foundations. + +

Notes

+

+Autodrop is disabled for this game. diff --git a/pysollib/games/auldlangsyne.py b/pysollib/games/auldlangsyne.py index 36c4229a..663cebe1 100644 --- a/pysollib/games/auldlangsyne.py +++ b/pysollib/games/auldlangsyne.py @@ -507,7 +507,7 @@ class Amazons_Foundation(AbstractFoundationStack): return False if from_stack not in self.game.s.rows: return False - if cards[0].rank == ACE: + if cards[0].rank == ACE and not self.cards: return True if not self.cards: return False @@ -525,7 +525,8 @@ class Amazons_Foundation(AbstractFoundationStack): class Amazons(AuldLangSyne): Talon_Class = StackWrapper(Amazons_Talon, max_rounds=-1) - Foundation_Class = StackWrapper(Amazons_Foundation, max_cards=7) + Foundation_Class = StackWrapper(Amazons_Foundation, max_cards=7, + suit=ANY_SUIT) def _shuffleHook(self, cards): return cards