mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-15 02:54:09 -04:00
Compare commits
3 commits
b24da7cc92
...
622d881a34
Author | SHA1 | Date | |
---|---|---|---|
|
622d881a34 | ||
|
ee282b6219 | ||
|
39d59547af |
20 changed files with 10249 additions and 1154 deletions
|
@ -35,6 +35,13 @@ Otherwise, the games' sources live under
|
|||
written in Python 2.7/3.x and you can try inheriting from an existing
|
||||
variant [class](https://en.wikipedia.org/wiki/Class_%28computer_programming%29).
|
||||
|
||||
## Contributing changesets / patches / diffs
|
||||
|
||||
One can contribute changesets either by opening [pull-requests](https://docs.github.com/en/desktop/contributing-and-collaborating-using-github-desktop/creating-an-issue-or-pull-request) or merge requests,
|
||||
or by submitting patches generated by [git diff](https://git-scm.com/docs/git-diff) or [git format-patch](https://git-scm.com/docs/git-format-patch)
|
||||
to a developer's email (e.g [@shlomif's](https://www.shlomifish.org/me/contact-me/) ) or uploading it to a web service (e.g: a pastesite, dropbox,
|
||||
or Google Drive).
|
||||
|
||||
# The Release Process
|
||||
|
||||
In order to publish a new version, follow these steps:
|
||||
|
|
2
Makefile
2
Makefile
|
@ -43,7 +43,7 @@ pot:
|
|||
xgettext --keyword=n_ --add-comments=TRANSLATORS: -o po/pysol.pot \
|
||||
pysollib/*.py pysollib/*/*.py pysollib/*/*/*.py data/pysolfc.glade
|
||||
set -e; \
|
||||
for lng in ru de pl it; do \
|
||||
for lng in de fr pl it ru ; do \
|
||||
msgmerge --update --quiet --backup=none po/$${lng}_pysol.po po/pysol.pot; \
|
||||
msgmerge --update --quiet --backup=none po/$${lng}_games.po po/games.pot; \
|
||||
done
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PySol 0.0.1\n"
|
||||
"POT-Creation-Date: Thu Jul 18 18:25:19 2019\n"
|
||||
"POT-Creation-Date: Mon Sep 7 17:14:01 2020\n"
|
||||
"PO-Revision-Date: 2007-09-05 17:43+0400\n"
|
||||
"Last-Translator: H. Schaekel <Holger.Schaekel@web.de>\n"
|
||||
"Language-Team: German\n"
|
||||
|
@ -335,6 +335,10 @@ msgstr "Bim-Bom"
|
|||
msgid "Bisley"
|
||||
msgstr "Bisley"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Bisley 13"
|
||||
msgstr "Bisley"
|
||||
|
||||
msgid "Bits n Bytes"
|
||||
msgstr "Bits und Bytes"
|
||||
|
||||
|
|
452
po/de_pysol.po
452
po/de_pysol.po
File diff suppressed because it is too large
Load diff
4031
po/fr_games.po
Normal file
4031
po/fr_games.po
Normal file
File diff suppressed because it is too large
Load diff
5039
po/fr_pysol.po
Normal file
5039
po/fr_pysol.po
Normal file
File diff suppressed because it is too large
Load diff
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PySol 0.0.1\n"
|
||||
"POT-Creation-Date: Wed Sep 25 11:43:34 2019\n"
|
||||
"POT-Creation-Date: Mon Sep 7 17:14:30 2020\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -336,6 +336,9 @@ msgstr ""
|
|||
msgid "Bisley"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bisley 13"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bits n Bytes"
|
||||
msgstr ""
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: it_games\n"
|
||||
"POT-Creation-Date: Thu Jul 18 18:43:59 2019\n"
|
||||
"POT-Creation-Date: Mon Sep 7 17:14:30 2020\n"
|
||||
"PO-Revision-Date: 2011-05-12 18:46+0200\n"
|
||||
"Last-Translator: Giuliano Colla <giuliano.colla@gmail.com>\n"
|
||||
"Language-Team: Italiano <it@li.org>\n"
|
||||
|
@ -338,6 +338,9 @@ msgstr ""
|
|||
msgid "Bisley"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bisley 13"
|
||||
msgstr ""
|
||||
|
||||
msgid "Bits n Bytes"
|
||||
msgstr ""
|
||||
|
||||
|
|
452
po/it_pysol.po
452
po/it_pysol.po
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PySol 0.0.1\n"
|
||||
"POT-Creation-Date: Thu Jul 18 18:43:59 2019\n"
|
||||
"POT-Creation-Date: Mon Sep 7 17:14:30 2020\n"
|
||||
"PO-Revision-Date: 2010-12-16 23:56+0100\n"
|
||||
"Last-Translator: Jerzy Trzeciak <artusek@wp.pl>\n"
|
||||
"Language-Team: Polish <pl@li.org>\n"
|
||||
|
@ -340,6 +340,10 @@ msgstr "Bim Bom"
|
|||
msgid "Bisley"
|
||||
msgstr "Bisley"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Bisley 13"
|
||||
msgstr "Bisley"
|
||||
|
||||
msgid "Bits n Bytes"
|
||||
msgstr "Bity i Bajty"
|
||||
|
||||
|
|
454
po/pl_pysol.po
454
po/pl_pysol.po
File diff suppressed because it is too large
Load diff
452
po/pysol.pot
452
po/pysol.pot
File diff suppressed because it is too large
Load diff
|
@ -5,7 +5,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PySol 0.0.1\n"
|
||||
"POT-Creation-Date: Thu Jul 18 18:43:59 2019\n"
|
||||
"POT-Creation-Date: Mon Sep 7 17:14:30 2020\n"
|
||||
"PO-Revision-Date: 2007-09-05 17:43+0400\n"
|
||||
"Last-Translator: Скоморох <skomoroh@gmail.com>\n"
|
||||
"Language-Team: Russian <ru@li.org>\n"
|
||||
|
@ -343,6 +343,10 @@ msgstr "Бим-Бом"
|
|||
msgid "Bisley"
|
||||
msgstr "Бисли"
|
||||
|
||||
#, fuzzy
|
||||
msgid "Bisley 13"
|
||||
msgstr "Бисли"
|
||||
|
||||
msgid "Bits n Bytes"
|
||||
msgstr "Биты и Байты"
|
||||
|
||||
|
|
452
po/ru_pysol.po
452
po/ru_pysol.po
File diff suppressed because it is too large
Load diff
|
@ -29,7 +29,7 @@ from pysollib.help import help_about, help_html
|
|||
from pysollib.mfxutil import Struct, openURL
|
||||
from pysollib.mfxutil import print_err
|
||||
from pysollib.mygettext import _
|
||||
from pysollib.pysolrandom import constructRandom
|
||||
from pysollib.pysolrandom import construct_random
|
||||
from pysollib.pysoltk import AllGames_StatsDialog, SingleGame_StatsDialog
|
||||
from pysollib.pysoltk import ColorsDialog
|
||||
from pysollib.pysoltk import EditTextDialog
|
||||
|
@ -251,7 +251,7 @@ class PysolMenubar(PysolMenubarTk):
|
|||
|
||||
def _mNewGameBySeed(self, seed, origin):
|
||||
try:
|
||||
random = constructRandom(seed)
|
||||
random = construct_random(seed)
|
||||
if random is None:
|
||||
return
|
||||
id = self.game.id
|
||||
|
|
|
@ -43,7 +43,7 @@ from pysollib.mfxutil import latin1_normalize, print_err
|
|||
from pysollib.mfxutil import pickle, unpickle
|
||||
from pysollib.mygettext import _
|
||||
from pysollib.options import Options
|
||||
from pysollib.pysolrandom import PysolRandom, constructRandom
|
||||
from pysollib.pysolrandom import PysolRandom, construct_random
|
||||
from pysollib.pysoltk import HTMLViewer
|
||||
from pysollib.pysoltk import HelpStatusbar, PysolStatusbar
|
||||
from pysollib.pysoltk import MfxDialog, MfxExceptionDialog, MfxMessageDialog
|
||||
|
@ -336,7 +336,7 @@ class Application:
|
|||
self.nextgame.id = gameid
|
||||
deal = self.commandline.deal
|
||||
self.nextgame.random = \
|
||||
None if deal is None else constructRandom(deal)
|
||||
None if deal is None else construct_random(deal)
|
||||
elif self.commandline.gameid is not None:
|
||||
self.nextgame.id, self.nextgame.random = \
|
||||
self.commandline.gameid, None
|
||||
|
|
|
@ -54,7 +54,7 @@ from pysollib.move import ATurnStackMove
|
|||
from pysollib.move import AUpdateStackMove
|
||||
from pysollib.mygettext import _
|
||||
from pysollib.mygettext import ungettext
|
||||
from pysollib.pysolrandom import LCRandom31, PysolRandom, constructRandom
|
||||
from pysollib.pysolrandom import LCRandom31, PysolRandom, construct_random
|
||||
from pysollib.pysoltk import CURSOR_WATCH
|
||||
from pysollib.pysoltk import Card
|
||||
from pysollib.pysoltk import EVENT_HANDLED, EVENT_PROPAGATE
|
||||
|
@ -3204,7 +3204,7 @@ class Game(object):
|
|||
game.version_tuple = version_tuple
|
||||
#
|
||||
initial_seed = random__int2str(pload(int))
|
||||
game.random = constructRandom(initial_seed)
|
||||
game.random = construct_random(initial_seed)
|
||||
state = pload()
|
||||
if not (isinstance(game.random, random2.Random) and
|
||||
isinstance(state, int)):
|
||||
|
|
|
@ -29,7 +29,7 @@ import time
|
|||
from io import BytesIO
|
||||
|
||||
from pysollib.mfxutil import destruct
|
||||
from pysollib.pysolrandom import constructRandom
|
||||
from pysollib.pysolrandom import construct_random
|
||||
from pysollib.settings import DEBUG, FCS_COMMAND
|
||||
from pysollib.util import KING
|
||||
|
||||
|
@ -873,12 +873,12 @@ class FreeCellSolver_Hint(Base_Solver_Hint):
|
|||
|
||||
def importFile(solver, fh, s_game, self):
|
||||
s_game.endGame()
|
||||
s_game.random = constructRandom('Custom')
|
||||
s_game.random = construct_random('Custom')
|
||||
s_game.newGame(
|
||||
shuffle=True,
|
||||
random=constructRandom('Custom'),
|
||||
random=construct_random('Custom'),
|
||||
dealer=lambda: solver.importFileHelper(fh, s_game))
|
||||
s_game.random = constructRandom('Custom')
|
||||
s_game.random = construct_random('Custom')
|
||||
|
||||
def importFileHelper(solver, fh, s_game):
|
||||
game = s_game.s
|
||||
|
|
|
@ -65,7 +65,7 @@ PysolRandom = pysol_cards.random.MTRandom
|
|||
|
||||
|
||||
# construct Random from seed string
|
||||
def constructRandom(s):
|
||||
def construct_random(s):
|
||||
if s == 'Custom':
|
||||
return CustomRandom()
|
||||
m = match_ms_deal_prefix(s)
|
||||
|
|
|
@ -59,7 +59,7 @@ from pysol_cards.random import random__int2str, random__str2int
|
|||
from pysol_cards.random_base import RandomBase
|
||||
|
||||
# So the localpaths will be overrided.
|
||||
from pysollib.pysolrandom import constructRandom
|
||||
from pysollib.pysolrandom import construct_random
|
||||
|
||||
# PySol imports
|
||||
|
||||
|
@ -122,7 +122,7 @@ AC 9D 7H 6D KS JH
|
|||
KC JS 9H 4S 7S AD
|
||||
''', 'PySolFC deal No. 123456')
|
||||
|
||||
rand = constructRandom('ms3000000000')
|
||||
rand = construct_random('ms3000000000')
|
||||
self.assertEqual(rand.getSeedAsStr(), 'ms3000000000')
|
||||
game = Game("freecell", 3000000000, RandomBase.DEALS_MS)
|
||||
# TEST
|
||||
|
@ -136,7 +136,7 @@ KC JS 9H 4S 7S AD
|
|||
8C AH 2H 5H 2D 5S
|
||||
''', 'Microsoft Deal #3E9 - long seed.')
|
||||
|
||||
rand = constructRandom('ms6000000000')
|
||||
rand = construct_random('ms6000000000')
|
||||
game = Game("freecell", 6000000000, RandomBase.DEALS_MS)
|
||||
# TEST
|
||||
got_s = game.calc_layout_string(ren)
|
||||
|
@ -169,12 +169,12 @@ QH 9H 9D 5S 7S 6C
|
|||
# TEST
|
||||
self.assertEqual(got, inp, 'str2long PySolFC roundtrip.')
|
||||
|
||||
rand = constructRandom('ms100000')
|
||||
rand = construct_random('ms100000')
|
||||
seed = rand.increaseSeed(rand.initial_seed)
|
||||
seed = rand.str(seed)
|
||||
# TEST
|
||||
self.assertEqual(seed, 'ms100001', 'increaseSeed for ms deals')
|
||||
rand = constructRandom(seed)
|
||||
rand = construct_random(seed)
|
||||
game = Game("freecell", int(seed[2:]), RandomBase.DEALS_MS)
|
||||
# TEST
|
||||
self._cmp_board(game.calc_layout_string(ren), '''5S AH 4H TD 4S JD JS
|
||||
|
@ -188,7 +188,7 @@ KH 6H 6C TC 2C 7D
|
|||
''', 'ms100001')
|
||||
|
||||
seed = 24000024
|
||||
rand = constructRandom(str(seed))
|
||||
rand = construct_random(str(seed))
|
||||
expected0 = rand.randint(0, 100)
|
||||
expected1 = rand.randint(0, 100)
|
||||
rand.reset()
|
||||
|
|
Loading…
Add table
Reference in a new issue