mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Minor cleanup of Aglet game.
This commit is contained in:
parent
ae40b654a1
commit
4160d75b6a
2 changed files with 7 additions and 6 deletions
|
@ -16,4 +16,4 @@ the reserve can be moved to the foundations.
|
||||||
<p>
|
<p>
|
||||||
The foundation piles are built up by rank, regardless of
|
The foundation piles are built up by rank, regardless of
|
||||||
suit. The game is won if all cards are moved to the
|
suit. The game is won if all cards are moved to the
|
||||||
reserve.
|
foundations.
|
||||||
|
|
|
@ -994,10 +994,11 @@ class Aglet(Game):
|
||||||
|
|
||||||
decks = self.gameinfo.decks
|
decks = self.gameinfo.decks
|
||||||
l, s = Layout(self), self.s
|
l, s = Layout(self), self.s
|
||||||
self.setSize(l.XM+(reserves+0.5+rows)*l.XS,
|
self.setSize(l.XM + (reserves + 0.5+rows) * l.XS,
|
||||||
l.YM+max(2*l.YS+7*l.YOFFSET, l.YS+playcards*l.YOFFSET))
|
l.YM + max(2 * l.YS + 7 * l.YOFFSET,
|
||||||
|
l.YS + playcards * l.YOFFSET))
|
||||||
|
|
||||||
x, y = self.width-l.XS, self.height-l.YS
|
x, y = l.XM, self.height-l.YS
|
||||||
s.talon = InitialDealTalonStack(x, y, self)
|
s.talon = InitialDealTalonStack(x, y, self)
|
||||||
|
|
||||||
x, y = l.XM, l.YM
|
x, y = l.XM, l.YM
|
||||||
|
@ -1007,12 +1008,12 @@ class Aglet(Game):
|
||||||
s.reserves.append(stack)
|
s.reserves.append(stack)
|
||||||
x += l.XS
|
x += l.XS
|
||||||
|
|
||||||
x, y = l.XM + (reserves+0.5+(rows-decks*4)/2.0)*l.XS, l.YM
|
x, y = l.XM + (reserves + 0.5 + (rows-decks * 4) / 2.0) * l.XS, l.YM
|
||||||
for i in range(4):
|
for i in range(4):
|
||||||
s.foundations.append(RK_FoundationStack(x, y, self, suit=ANY_SUIT))
|
s.foundations.append(RK_FoundationStack(x, y, self, suit=ANY_SUIT))
|
||||||
x += l.XS
|
x += l.XS
|
||||||
|
|
||||||
x, y = l.XM+(reserves+0.5)*l.XS, l.YM+l.YS
|
x, y = l.XM+(reserves + 0.5) * l.XS, l.YM + l.YS
|
||||||
for i in range(rows):
|
for i in range(rows):
|
||||||
s.rows.append(BasicRowStack(x, y, self, base_rank=NO_RANK))
|
s.rows.append(BasicRowStack(x, y, self, base_rank=NO_RANK))
|
||||||
x += l.XS
|
x += l.XS
|
||||||
|
|
Loading…
Add table
Reference in a new issue