From 808b1d7d0ad92be542a7c03ae23e3db694866204 Mon Sep 17 00:00:00 2001 From: Joe R Date: Fri, 30 Dec 2022 16:18:12 -0500 Subject: [PATCH] Added Lasker game. --- html-src/rules/lasker.html | 12 ++++++++++++ pysollib/gamedb.py | 2 +- pysollib/games/beleagueredcastle.py | 13 ++++++++++++- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 html-src/rules/lasker.html diff --git a/html-src/rules/lasker.html b/html-src/rules/lasker.html new file mode 100644 index 00000000..93dfd5d1 --- /dev/null +++ b/html-src/rules/lasker.html @@ -0,0 +1,12 @@ +

Lasker

+

+Beleaguered Castle type. 1 deck. No redeal. + +

Object

+

+Move all cards to the foundations. + +

Quick Description

+

+Like Chessboard, but sequences of +cards in the tableau can be moved together. diff --git a/pysollib/gamedb.py b/pysollib/gamedb.py index 7694b5cf..ddc3d66e 100644 --- a/pysollib/gamedb.py +++ b/pysollib/gamedb.py @@ -549,7 +549,7 @@ class GI: tuple(range(22217, 22219))), ('fc-2.14', tuple(range(811, 827))), ('fc-2.15', tuple(range(827, 855)) + tuple(range(22400, 22407))), - ('dev', tuple(range(855, 881))) + ('dev', tuple(range(855, 882))) ) # deprecated - the correct way is to or a GI.GT_XXX flag diff --git a/pysollib/games/beleagueredcastle.py b/pysollib/games/beleagueredcastle.py index 5dbb7d30..821fdafb 100644 --- a/pysollib/games/beleagueredcastle.py +++ b/pysollib/games/beleagueredcastle.py @@ -44,7 +44,8 @@ from pysollib.stack import \ UD_SS_RowStack, \ WasteStack, \ WasteTalonStack -from pysollib.util import ACE, ANY_RANK, KING, NO_RANK, QUEEN, RANKS +from pysollib.util import ACE, ANY_RANK, KING, NO_RANK, QUEEN, RANKS,\ + UNLIMITED_ACCEPTS, UNLIMITED_MOVES class BeleagueredCastleType_Hint(CautiousDefaultHint): @@ -374,6 +375,7 @@ class CastlesEnd(Bastion): # ************************************************************************ # * Chessboard +# * Lasker # ************************************************************************ class Chessboard_Foundation(SS_FoundationStack): @@ -423,6 +425,12 @@ class Chessboard(Fortress): self.texts.info.config(text=t) +class Lasker(Chessboard): + RowStack_Class = StackWrapper(Chessboard_RowStack, mod=13, + max_move=UNLIMITED_MOVES, + max_accept=UNLIMITED_ACCEPTS) + + # ************************************************************************ # * Siegecraft # * Stronghold @@ -932,3 +940,6 @@ registerGame(GameInfo(665, PenelopesWeb, "Penelope's Web", registerGame(GameInfo(831, Siegecraft, "Siegecraft", GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 1, 0, GI.SL_MOSTLY_SKILL)) +registerGame(GameInfo(881, Lasker, "Lasker", + GI.GT_BELEAGUERED_CASTLE | GI.GT_OPEN, 1, 0, + GI.SL_SKILL))