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

Merge remote-tracking branch 'jimsize/master' into pysolfc_modules_modularization

Conflicts:
	.gitignore
	Makefile
	pysollib/acard.py
	pysollib/actions.py
	pysollib/app.py
	pysollib/customgame.py
	pysollib/game.py
	pysollib/gamedb.py
	pysollib/games/__init__.py
	pysollib/games/auldlangsyne.py
	pysollib/games/braid.py
	pysollib/games/calculation.py
	pysollib/games/camelot.py
	pysollib/games/canfield.py
	pysollib/games/curdsandwhey.py
	pysollib/games/fan.py
	pysollib/games/golf.py
	pysollib/games/klondike.py
	pysollib/games/larasgame.py
	pysollib/games/mahjongg/mahjongg.py
	pysollib/games/mahjongg/shisensho.py
	pysollib/games/matriarchy.py
	pysollib/games/napoleon.py
	pysollib/games/numerica.py
	pysollib/games/osmosis.py
	pysollib/games/pileon.py
	pysollib/games/royalcotillion.py
	pysollib/games/special/memory.py
	pysollib/games/special/poker.py
	pysollib/games/special/tarock.py
	pysollib/games/spider.py
	pysollib/games/takeaway.py
	pysollib/games/terrace.py
	pysollib/games/threepeaks.py
	pysollib/games/tournament.py
	pysollib/games/ultra/dashavatara.py
	pysollib/games/ultra/hanafuda.py
	pysollib/games/ultra/hanafuda1.py
	pysollib/games/ultra/hanafuda_common.py
	pysollib/games/ultra/hexadeck.py
	pysollib/games/ultra/mughal.py
	pysollib/games/yukon.py
	pysollib/help.py
	pysollib/hint.py
	pysollib/images.py
	pysollib/init.py
	pysollib/layout.py
	pysollib/main.py
	pysollib/mfxutil.py
	pysollib/options.py
	pysollib/pysolgtk/colorsdialog.py
	pysollib/pysolgtk/fontsdialog.py
	pysollib/pysolgtk/menubar.py
	pysollib/pysolgtk/playeroptionsdialog.py
	pysollib/pysolgtk/selectcardset.py
	pysollib/pysolgtk/selectgame.py
	pysollib/pysolgtk/selecttile.py
	pysollib/pysolgtk/soundoptionsdialog.py
	pysollib/pysolgtk/statusbar.py
	pysollib/pysolgtk/timeoutsdialog.py
	pysollib/pysolgtk/tkhtml.py
	pysollib/pysolgtk/tkstats.py
	pysollib/pysolgtk/tkwidget.py
	pysollib/pysolrandom.py
	pysollib/pysoltk.py
	pysollib/resource.py
	pysollib/stack.py
	pysollib/stats.py
	pysollib/tile/colorsdialog.py
	pysollib/tile/edittextdialog.py
	pysollib/tile/findcarddialog.py
	pysollib/tile/fontsdialog.py
	pysollib/tile/gameinfodialog.py
	pysollib/tile/menubar.py
	pysollib/tile/playeroptionsdialog.py
	pysollib/tile/selectcardset.py
	pysollib/tile/selectgame.py
	pysollib/tile/selecttile.py
	pysollib/tile/solverdialog.py
	pysollib/tile/soundoptionsdialog.py
	pysollib/tile/statusbar.py
	pysollib/tile/timeoutsdialog.py
	pysollib/tile/tkconst.py
	pysollib/tile/tkhtml.py
	pysollib/tile/tkstats.py
	pysollib/tile/tkwidget.py
	pysollib/tile/toolbar.py
	pysollib/tile/ttk.py
	pysollib/tile/wizarddialog.py
	pysollib/tk/colorsdialog.py
	pysollib/tk/edittextdialog.py
	pysollib/tk/findcarddialog.py
	pysollib/tk/fontsdialog.py
	pysollib/tk/gameinfodialog.py
	pysollib/tk/menubar.py
	pysollib/tk/playeroptionsdialog.py
	pysollib/tk/selectcardset.py
	pysollib/tk/selectgame.py
	pysollib/tk/selecttile.py
	pysollib/tk/solverdialog.py
	pysollib/tk/soundoptionsdialog.py
	pysollib/tk/statusbar.py
	pysollib/tk/timeoutsdialog.py
	pysollib/tk/tkconst.py
	pysollib/tk/tkhtml.py
	pysollib/tk/tkstats.py
	pysollib/tk/tkwidget.py
	pysollib/tk/toolbar.py
	pysollib/tk/wizarddialog.py
	pysollib/util.py
	pysollib/winsystems/common.py
	pysollib/wizardpresets.py
	pysollib/wizardutil.py
	setup_osx.py
This commit is contained in:
Shlomi Fish 2012-12-07 16:32:30 +02:00
commit e2a6c00606
13 changed files with 84 additions and 67 deletions

10
.gitignore vendored
View file

@ -1 +1,11 @@
tests/individually-importing/*.py
build/*
data/cardsets/*
data/html/*
dist/*
docs/all_games.html
html-src/html/*
locale/*
po/pl.po
po/ru.po
*.pyc

View file

@ -0,0 +1,14 @@
<h1>Daddy Longlegs</h1>
<p>Spider type. 1 deck. No redeal.</p>
<h3>Object</h3>
<p>Group all the cards into four sets of 13 cards by suit in ascending sequence from Ace to King.</p>
<h3>Rules</h3>
<p>Cards are dealt four at a time, one card into each of four piles. A card can be moved onto the end of another pile, if it is the same suit and follows in sequence. The rest of the pile moves with the card. Only an Ace (with the rest of its pile) can move to an empty space.</p>
<p>At any time, you can deal more cards by clicking on the talon. One card will be added to each of the playing piles.</p>
<h3>History</h3>
<p>I created Daddy Longlegs in the early 1980's to amuse myself with a different solitaire variant. Over the years, I have implemented this game many times under the name of "Deal Four" as an exercise when learning new programming languages.</p>
<p>I learned of pysol in 2006 and almost immediately realized that it is a perfect platform for Daddy Longlegs. Thank you, Markus Oberhumer!</p>
<h3>Author</h3>
<p>Jim Sizelove</p>
<p>sizelji@comcast.net</p>
<p>March 8, 2007</p>

View file

@ -63,7 +63,6 @@ from pysollib.actions import PysolMenubar
from pysollib.actions import PysolToolbar
from pysollib.help import help_about, destroy_help_html
# ************************************************************************
# * Statistics
# ************************************************************************
@ -517,7 +516,7 @@ class Application:
self.nextgame.id, self.nextgame.random = 0, None
try:
self.runGame(id, random)
except:
except Exception:
# try Klondike if current game fails
if id == 2:
raise # internal error?

View file

@ -30,7 +30,6 @@ from pysollib.hint import AbstractHint, DefaultHint, CautiousDefaultHint, Yukon_
from pysollib.wizardutil import WizardWidgets
# ************************************************************************
# *
# ************************************************************************

View file

@ -35,6 +35,7 @@ import camelot
import canfield
import capricieuse
import curdsandwhey
import daddylonglegs
import dieboesesieben
import diplomat
import doublets

View file

@ -1,33 +1,3 @@
#!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
##---------------------------------------------------------------------------##
##
## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
## Copyright (C) 2003 Mt. Hood Playing Card Co.
## Copyright (C) 2005-2009 Skomoroh
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
##---------------------------------------------------------------------------##
__all__ = []
# imports
import sys
# PySol imports
from pysollib.mygettext import _, n_
from pysollib.gamedb import registerGame, GameInfo, GI
from pysollib.util import *
from pysollib.stack import *

View file

@ -1,33 +1,3 @@
#!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
##---------------------------------------------------------------------------##
##
## Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
## Copyright (C) 2003 Mt. Hood Playing Card Co.
## Copyright (C) 2005-2009 Skomoroh
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your option) any later version.
##
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##
##---------------------------------------------------------------------------##
__all__ = []
# imports
import sys
# PySol imports
from pysollib.mygettext import _, n_
from pysollib.gamedb import registerGame, GameInfo, GI
from pysollib.util import *
from pysollib.stack import *

View file

@ -0,0 +1,57 @@
## vim:ts=4:et:nowrap:fileencoding=utf-8
##
# imports
import sys
# PySol imports
from pysollib.gamedb import registerGame, GameInfo, GI
from pysollib.util import *
from pysollib.stack import *
from pysollib.game import Game
from pysollib.layout import Layout
#***********************************************************************
# Daddy Longlegs (by Jim Sizelove)
#***********************************************************************
class DaddyLonglegs(Game):
Talon_Class = DealRowTalonStack
RowStack_Class = StackWrapper(Yukon_SS_RowStack, dir=1, base_rank=ACE)
def createGame(self, **layout):
# create layout
l, s = Layout(self), self.s
# set window
self.setSize(l.XM + 6*l.XS, l.YM + 7*l.YS)
# create stacks
x, y, = l.XM, l.YM
s.talon = self.Talon_Class(x, y, self)
l.createText(s.talon, "ss")
x = x + 3*l.XS/2
for i in range(4):
s.rows.append(self.RowStack_Class(x, y, self))
x = x + l.XS
# define stack-groups
l.defaultStackGroups()
def startGame(self):
self.s.talon.dealRow()
def isGameWon(self):
if self.s.talon.cards:
return 0
for row in self.s.rows:
if not isSameSuitSequence(row.cards, dir=1):
return 0
return 1
# register the game
registerGame(GameInfo(555001, DaddyLonglegs, "Daddy Longlegs",
GI.GT_SPIDER, 1, 0, GI.SL_MOSTLY_SKILL,
rules_filename="daddylonglegs.html"))

View file

@ -33,7 +33,6 @@ from pysollib.settings import DEBUG, FCS_COMMAND
from pysollib.mfxutil import destruct
from pysollib.util import KING
# ************************************************************************
# * HintInterface is an abstract class that defines the public
# * interface - it only consists of the constructor

View file

@ -34,7 +34,6 @@ from pysollib.mfxutil import Image, ImageTk, USE_PIL
# Toolkit imports
from pysollib.pysoltk import loadImage, copyImage, createImage, shadowImage, createBottom, resizeBottom
# ************************************************************************
# * Images
# ************************************************************************

View file

@ -45,7 +45,6 @@ from pysollib.pysoltk import MfxMessageDialog
from pysollib.pysoltk import MfxRoot
from pysollib.pysoltk import PysolProgressBar
# ************************************************************************
# *
# ************************************************************************

View file

@ -112,7 +112,6 @@ from pysollib.pysoltk import markImage
from pysollib.settings import TOOLKIT
from pysollib.settings import DEBUG
# ************************************************************************
# * Let's start with some test methods for cards.
# * Empty card-lists return false.

View file

@ -30,6 +30,7 @@ from pysollib.layout import Layout
from wizardpresets import presets
from pysollib.mygettext import _, n_
# ************************************************************************
# *
# ************************************************************************