diff --git a/html-src/rules/ishido.html b/html-src/rules/ishido.html index ce76bd0f5..d7553adcf 100644 --- a/html-src/rules/ishido.html +++ b/html-src/rules/ishido.html @@ -10,7 +10,8 @@

Rules

The tiles are played to an grid of eight rows of twelve columns each. At the start of the game, a tile is placed in each corner, and two are -placed in two diagonally adjacent spaces in the center. +placed in two diagonally adjacent spaces in the center. The initially +placed tiles include one of each color and one of each symbol.

Tiles are drawn from the talon one at a time, and can be played to the main playing area. A tile can only be played if it is adjacent to @@ -26,4 +27,4 @@

Rules

History

Ishido was originally published as a video game "Ishido: The Way of Stones" -in 1990. It has since been recreated many times. +by Accolade in 1990. It has since been recreated many times. diff --git a/pysollib/games/special/ishido.py b/pysollib/games/special/ishido.py index 782c72f34..61353bec2 100644 --- a/pysollib/games/special/ishido.py +++ b/pysollib/games/special/ishido.py @@ -111,6 +111,21 @@ def startGame(self): def isGameWon(self): return len(self.s.talon.cards) == 0 + def _shuffleHook(self, cards): + # prepare first cards + symbols = [] + colors = [] + topcards = [] + for c in cards[:]: + if c.suit not in colors and c.rank not in symbols: + topcards.append(c) + cards.remove(c) + symbols.append(c.rank) + colors.append(c.suit) + if len(colors) >= 6 or len(symbols) >= 6: + break + return cards + topcards + def isValidPlay(self, playSpace, playRank, playSuit): # check that there's an adjacent card adjacent = self.getAdjacent(playSpace)