From 5402486d1c84d0c3faf48f43e113979269dfaf99 Mon Sep 17 00:00:00 2001 From: Alexey Radkov Date: Fri, 28 Apr 2023 20:40:10 +0400 Subject: [PATCH] Well: show the height of stacks of the rows Without this hint, tracking the height of the rows stacks gets very hard and uncomfortable. Note that this information doesn't expose any undesirable secrets because the player knows the base card of each row right after the dealing the cards. This change will let the player track all the 4 rows base cards easily during the game. (cherry picked from commit a04f60833c7df9aa6bec7fee01514351bd67ee80) --- pysollib/games/braid.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pysollib/games/braid.py b/pysollib/games/braid.py index f8de7489..3be60584 100644 --- a/pysollib/games/braid.py +++ b/pysollib/games/braid.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # --------------------------------------------------------------------------- # @@ -545,14 +544,14 @@ class Well(Game): l, s = Layout(self), self.s # set window - self.setSize(l.XM+6*l.XS, l.YM+6*l.YS+l.TEXT_HEIGHT) + self.setSize(3*l.XM+6*l.XS, l.YM+6*l.YS+3*l.TEXT_HEIGHT) # register extra stack variables s.addattr(wastes=[]) # foundations suit = 0 - x0, y0 = l.XM+1.5*l.XS, l.YM+1.5*l.YS+l.TEXT_HEIGHT + x0, y0 = l.XM+1.5*l.XS, l.YM+1.5*l.YS+2*l.TEXT_HEIGHT for xx, yy in ((3, 0), (0, 3), (3, 3), @@ -564,19 +563,20 @@ class Well(Game): suit += 1 # rows - x0, y0 = l.XM+l.XS, l.YM+l.YS+l.TEXT_HEIGHT - for xx, yy in ((0, 2), - (2, 0), - (4, 2), - (2, 4)): + x0, y0 = l.XM+l.XS, l.YM+l.YS+2*l.TEXT_HEIGHT + for xx, yy, anchor in ((0, 2, 'w'), + (2, 0, 'n'), + (4, 2, 'e'), + (2, 4, 's')): x, y = x0+xx*l.XS, y0+yy*l.YS stack = SS_RowStack(x, y, self, dir=1, mod=13, max_move=1) stack.getBottomImage = stack._getReserveBottomImage stack.CARD_YOFFSET = 0 + l.createText(stack, anchor) s.rows.append(stack) # left stack - x, y = l.XM, l.YM+l.YS+l.TEXT_HEIGHT + x, y = l.XM, l.YM+l.YS+2*l.TEXT_HEIGHT stack = SS_RowStack( x, y, self, base_rank=ACE, dir=1, mod=13, max_move=1) stack.getBottomImage = stack._getReserveBottomImage @@ -584,7 +584,7 @@ class Well(Game): s.rows.append(stack) # reserves - x0, y0 = l.XM+2*l.XS, l.YM+2*l.YS+l.TEXT_HEIGHT + x0, y0 = l.XM+2*l.XS, l.YM+2*l.YS+2*l.TEXT_HEIGHT for xx, yy, anchor in ((0, 1, 'e'), (1, 0, 's'), (2, 1, 'w'),