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:
parent
16b7a3a03e
commit
6984edb6ba
2 changed files with 26 additions and 2 deletions
24
html-src/rules/lastchance.html
Normal file
24
html-src/rules/lastchance.html
Normal 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.
|
|
@ -115,9 +115,9 @@ class Numerica(Game):
|
||||||
|
|
||||||
# set window
|
# set window
|
||||||
# (piles up to 20 cards are playable in default window size)
|
# (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)
|
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
|
# create stacks
|
||||||
x0 = l.XM + l.XS * 3 // 2
|
x0 = l.XM + l.XS * 3 // 2
|
||||||
|
|
Loading…
Add table
Reference in a new issue