1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Fixed Numerica game scaling to avoid cutoff.

This commit is contained in:
Joe R 2021-10-09 18:11:45 -04:00
parent 513962b8f3
commit 1bc31007c5
2 changed files with 26 additions and 2 deletions

View file

@ -0,0 +1,24 @@
<h1>Last Chance</h1>
<p>
Numerica type. 1 deck. No redeal.
<h3>Object</h3>
<p>
Move all cards to the foundations.
<h3>Rules</h3>
<p>
At the start of the game, one card is dealt face-down
as a reserve pile. This is the last chance card.
<p>
Six cards are dealt to six tableau piles. Cards are
dealt from the stock one at a time, and are immediately
played to a tableau or foundation pile. Tableau piles can
be built regardless of suit or rank. Empty tableau piles
can be filled by cards from other tableau piles, but
otherwise, cards on tableau piles can't be moved.
<p>
Once the stock and waste piles are empty, the last chance
card is flipped up and can be played to a foundation pile.
<p>
Foundations are built up by suit, starting from ace.

View file

@ -115,9 +115,9 @@ class Numerica(Game):
# set window
# (piles up to 20 cards are playable in default window size)
h = max(2*l.YS, 20*l.YOFFSET)
h = max(2.5 * l.YS, 20 * l.YOFFSET)
max_rows = max(rows, foundations)
self.setSize(l.XM+(1.5+max_rows)*l.XS+l.XM, l.YM + l.YS + h)
self.setSize(l.XM + (1.5 + max_rows) * l.XS + l.XM, l.YM + l.YS + h)
# create stacks
x0 = l.XM + l.XS * 3 // 2