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

+ added file AUTHORS

* improved Not Shisen Sho hint
* minor fixes


git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@212 efabe8c0-fbe8-4139-b769-b5e6d273206e
This commit is contained in:
skomoroh 2007-09-25 21:47:01 +00:00
parent de714447b6
commit 2ae3f5505c
5 changed files with 60 additions and 8 deletions

24
AUTHORS Normal file
View file

@ -0,0 +1,24 @@
Main Authors
============
Markus Franz Xaver Johannes Oberhumer <markus@oberhumer.com>
author of PySol
T. Kirk
author of Ultrasol
Skomoroh <skomoroh@users.sourceforge.net>
author of PySolFC
Brian Lenihan <brianl@users.sourceforge.net>
OSX package maintainer
Games contributors
==================
Mark Andrews
Galen Brooks <galen@nine.com>
Andrew Csillag <drew_csillag@geocities.com>
Michael Foord
Matthew Hohlfeld <hohlfeld@cs.ucsd.edu>
Nicola Larosa
John Stoneham <obijohn99@aol.com>
David Svoboda <svoboda@users.sourceforge.net>

View file

@ -11,6 +11,7 @@ include pysollib/tk/*.py pysollib/tile/*.py pysollib/pysolgtk/*.py
include pysollib/games/*.py pysollib/games/special/*.py include pysollib/games/*.py pysollib/games/special/*.py
include pysollib/games/ultra/*.py pysollib/games/mahjongg/*.py include pysollib/games/ultra/*.py pysollib/games/mahjongg/*.py
include data/tcl/*.tcl include data/tcl/*.tcl
include data/pysolfc.glade
graft data/themes graft data/themes
include scripts/build.bat scripts/create_iss.py scripts/mahjongg_utils.py include scripts/build.bat scripts/create_iss.py scripts/mahjongg_utils.py
include scripts/pygettext.py scripts/all_games.py scripts/cardset_viewer.py include scripts/pygettext.py scripts/all_games.py scripts/cardset_viewer.py

View file

@ -225,6 +225,7 @@ class GI:
262: 105, # Canfield 262: 105, # Canfield
902: 88, # Trefoil 902: 88, # Trefoil
904: 68, # Lexington Harp 904: 68, # Lexington Harp
297: 631, # Alternation/Alternations
} }
GAMES_BY_COMPATIBILITY = ( GAMES_BY_COMPATIBILITY = (
@ -336,7 +337,8 @@ class GI:
220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229,
230, 231, 232, 233, 234, 235, 236)), 230, 231, 232, 233, 234, 235, 236)),
("4.70", (237,)), ("4.70", (237,)),
('fc-0.5.0', (#121, 122, 187, 188, 189, 190, 191, 192, 194, 197, 198, ('fc-0.5.0', ( # moved from Ultrasol
#121, 122, 187, 188, 189, 190, 191, 192, 194, 197, 198,
5301, 5302, 9011, 11001, 11002, 11003, 11004, 11005, 5301, 5302, 9011, 11001, 11002, 11003, 11004, 11005,
11006, 12353, 12354, 12355, 12356, 12357, 12358, 12359, 11006, 12353, 12354, 12355, 12356, 12357, 12358, 12359,
12360, 12361, 12362, 12363, 12364, 12365, 12366, 12367, 12360, 12361, 12362, 12363, 12364, 12365, 12366, 12367,
@ -361,6 +363,7 @@ class GI:
('fc-0.9.4', tuple(range(661, 671))), ('fc-0.9.4', tuple(range(661, 671))),
('fc-1.0', tuple(range(671, 711))), ('fc-1.0', tuple(range(671, 711))),
('fc-1.1', tuple(range(711, 759))), ('fc-1.1', tuple(range(711, 759))),
('fc-1.2', tuple(range(11011, 11014))),
) )
# deprecated - the correct way is to or a GI.GT_XXX flag # deprecated - the correct way is to or a GI.GT_XXX flag

View file

@ -61,7 +61,7 @@ class Shisen_Hint(AbstractHint):
# simple scoring... # simple scoring...
score = 1000 + r.rown + t.rown score = 1000 + r.rown + t.rown
self.addHint(score, 1, r, t) self.addHint(score, 1, r, t)
i = i + 1 i += 1
# /*********************************************************************** # /***********************************************************************
@ -456,6 +456,27 @@ class Shisen_24x12_NoGravity(AbstractShisenGame):
# // Not Shisen-Sho # // Not Shisen-Sho
# ************************************************************************/ # ************************************************************************/
class NotShisen_Hint(AbstractHint):
# FIXME: no intelligence whatsoever is implemented here
def computeHints(self):
game = self.game
# get free stacks
stacks = []
for r in game.s.rows:
if r.cards:
stacks.append(r)
# find matching tiles
i = 0
for r in stacks:
for t in stacks[i+1:]:
#if game.cardsMatch(r.cards[0], t.cards[0]):
if r.acceptsCards(t, t.cards):
# simple scoring...
score = 2000 - r.rown - t.rown
self.addHint(score, 1, r, t)
i += 1
class NotShisen_RowStack(Shisen_RowStack): class NotShisen_RowStack(Shisen_RowStack):
def acceptsCards(self, from_stack, cards): def acceptsCards(self, from_stack, cards):
if not self.game.cardsMatch(self.cards[0], cards[-1]): if not self.game.cardsMatch(self.cards[0], cards[-1]):
@ -467,15 +488,18 @@ class NotShisen_RowStack(Shisen_RowStack):
class NotShisen_14x6(AbstractShisenGame): class NotShisen_14x6(AbstractShisenGame):
Hint_Class = NotShisen_Hint
RowStack_Class = NotShisen_RowStack RowStack_Class = NotShisen_RowStack
L = (14, 6) L = (14, 6)
NCARDS = 84 NCARDS = 84
class NotShisen_18x8(AbstractShisenGame): class NotShisen_18x8(AbstractShisenGame):
Hint_Class = NotShisen_Hint
RowStack_Class = NotShisen_RowStack RowStack_Class = NotShisen_RowStack
L = (18, 8) L = (18, 8)
class NotShisen_24x12(AbstractShisenGame): class NotShisen_24x12(AbstractShisenGame):
Hint_Class = NotShisen_Hint
RowStack_Class = NotShisen_RowStack RowStack_Class = NotShisen_RowStack
L = (24, 12) L = (24, 12)
NCARDS = 288 NCARDS = 288

View file

@ -50,11 +50,11 @@ if os.name == 'posix':
##import sys; sys.exit() ##import sys; sys.exit()
long_description = '''\ long_description = '''\
PySol is a solitaire card game. Its features include support for many PySolFC is a collection of more than 1000 solitaire card games.
different games, very nice look and feel, multiple cardsets and Its features include modern look and feel (uses Tile widget set), multiple
backgrounds, unlimited undo & redo, load & save games, player cardsets and tableau backgrounds, sound, unlimited undo, player statistics,
statistics, hint system, demo games, support for user written plug-ins, a hint system, demo games, a solitaire wizard, support for user written
integrated HTML help browser, and it\'s free Open Source software. plug-ins, an integrated HTML help browser, and lots of documentation.
''' '''
kw = { kw = {
@ -63,7 +63,7 @@ kw = {
'url' : PACKAGE_URL, 'url' : PACKAGE_URL,
'author' : 'Skomoroh', 'author' : 'Skomoroh',
'author_email' : 'skomoroh@gmail.com', 'author_email' : 'skomoroh@gmail.com',
'description' : 'PySol - a solitaire game collection', 'description' : 'a Python solitaire game collection',
'long_description' : long_description, 'long_description' : long_description,
'license' : 'GPL', 'license' : 'GPL',
'scripts' : ['pysol.py'], 'scripts' : ['pysol.py'],