Joe R
dba55c20fd
Split spread stacks logic from auto-scale logic.
2021-04-25 08:51:04 +03:00
Juhani Numminen
1c79d5437e
Refactor initCardsets
...
Make variable names descriptive.
Don't check for duplicate or empty strings in result of getSearchDirs() because
that is not necessary. Document those properties in a comment in resource.py.
Wrap try...except more closely around expressions where we want to catch.
2020-10-15 12:30:36 +03:00
Juhani Numminen
bf9ce90a5b
Refactor cardset config.txt parser to a new module
2020-10-06 14:35:28 +03:00
Shlomi Fish
39d59547af
flake8 compliance
2020-09-07 11:20:53 +03:00
Shlomi Fish
3de9955879
try2fix flake 8 tests [travis/etc.]
2020-06-17 20:53:11 +03:00
Juhani Numminen
032b645e0f
Do not catch exceptions too broadly in mainloop
...
StopIteration seems to be the expected way to stop, at least
for the tk and tile interfaces.
2020-02-09 22:07:16 +02:00
Juhani Numminen
65b86f2d1d
Improve internationalization
...
- More strings marked for translation
- Used format strings instead of concatinating fragments
- Removed space before '?' or '!' from sentences in English
Following the GNU gettext guidelines at
https://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings
2019-08-31 13:22:21 +03:00
Juhani Numminen
26631a7a22
Remove checks for individual cardsets' COPYRIGHT files
...
It is not strictly necessary to check the presence of the COPYRIGHT file
since pysollib/{tile,tk}/selectcardset.py will work even if it's missing.
In the Debian package, individual COPYRIGHT files are missing as all license
information should be in one file anyway, /usr/share/doc/pysolfc/copyright.
Thanks to Bernhard Reiter who originally wrote this patch:
https://salsa.debian.org/games-team/pysolfc/blob/87493fb/debian/patches/remove_checks_for_copyright_files
2019-07-28 10:05:05 +03:00
Shlomi Fish
75ffea5005
Extract a method or a function.
...
This is Refactoring / code cleanup.
See:
* https://refactoring.com/catalog/extractMethod.html
* https://en.wikipedia.org/wiki/Code_refactoring
* https://www.refactoring.com/
* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/
Some small optimisations may have slipped in as well.
2019-05-31 18:32:47 +03:00
Shlomi Fish
a073d20af7
Refactoring / code cleanup.
...
See:
* https://en.wikipedia.org/wiki/Code_refactoring
* https://www.refactoring.com/
* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/
Some small optimisations may have slipped in as well.
2019-05-31 18:09:57 +03:00
Shlomi Fish
9acc97be8a
Refactoring / code cleanup.
...
See:
* https://en.wikipedia.org/wiki/Code_refactoring
* https://www.refactoring.com/
* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/
Some small optimisations may have slipped in as well.
2019-05-31 17:22:49 +03:00
Shlomi Fish
26e5aeb045
Rename variable/s to make them more descriptive.
...
dir is a py builtin.
2019-05-31 16:42:57 +03:00
Shlomi Fish
32411ab0ec
Refactoring.
2019-05-31 16:32:24 +03:00
Shlomi Fish
efddc917b2
Extract a method or a function.
...
This is Refactoring / code cleanup.
See:
* https://refactoring.com/catalog/extractMethod.html
* https://en.wikipedia.org/wiki/Code_refactoring
* https://www.refactoring.com/
* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/
Some small optimisations may have slipped in as well.
2019-05-31 16:03:22 +03:00
Shlomi Fish
4853b2dc5f
pickle backcompat.
2019-05-16 18:46:05 +03:00
Shlomi Fish
76804c6d76
flake8
2019-04-30 18:25:01 +03:00
Shlomi Fish
9142b90cb2
Refactoring / code cleanup.
...
Remove the unused "Comments" class.
See:
* https://en.wikipedia.org/wiki/Code_refactoring
* https://www.refactoring.com/
* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/
Some small optimisations may have slipped in as well.
2019-04-30 17:49:36 +03:00
Shlomi Fish
ea73eb32a3
refactoring
2019-04-30 17:40:18 +03:00
Shlomi Fish
824407b136
Extract a common module/library/header.
...
This is Refactoring / code cleanup.
See:
* https://refactoring.com/catalog/extractMethod.html
* https://en.wikipedia.org/wiki/Code_refactoring
* https://www.refactoring.com/
* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/
Some small optimisations may have slipped in as well.
2019-04-30 17:14:57 +03:00
Shlomi Fish
9af86cddfb
Extract a common module/library/header.
...
This is Refactoring / code cleanup.
See:
* https://refactoring.com/catalog/extractMethod.html
* https://en.wikipedia.org/wiki/Code_refactoring
* https://www.refactoring.com/
* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/
Some small optimisations may have slipped in as well.
2019-04-29 15:14:36 +03:00
Shlomi Fish
90323173a7
Extract a common module/library/header.
...
This is Refactoring / code cleanup.
See:
* https://refactoring.com/catalog/extractMethod.html
* https://en.wikipedia.org/wiki/Code_refactoring
* https://www.refactoring.com/
* https://www.joelonsoftware.com/2002/01/23/rub-a-dub-dub/
Some small optimisations may have slipped in as well.
2019-04-29 15:08:04 +03:00
Shlomi Fish
9e148b88fe
implement the --deal command line param.
...
It implements a starting deal seed/index/number.
2019-04-29 14:51:01 +03:00
Shlomi Fish
cb25f39136
abort on invalid command line game.
2019-04-29 14:24:21 +03:00
Shlomi Fish
ed18fd8156
Order imports based on flake8-import-order.
...
Tested on ci. See https://github.com/PyCQA/flake8-import-order . In the
process did some other cleanups and
https://en.wikipedia.org/wiki/Code_refactoring .
2019-01-11 23:55:06 +02:00
lb@lb520
6f756cd05b
Toolbar image quality in kivy - fixed to bluecurve/xlarge
2018-05-23 14:33:29 +02:00
Shlomi Fish
c826799736
Refactoring
2018-03-13 18:31:19 +02:00
Shlomi Fish
d49c0103f4
Refactoring
2018-03-13 15:46:24 +02:00
Shlomi Fish
f18c394c33
Extract a common function.
2018-03-12 21:58:06 +02:00
Shlomi Fish
ed07eaf3fb
Refactoring: extract common logic.
2018-03-12 21:38:30 +02:00
Shlomi Fish
e6586a6e78
refactored some code.
2018-03-12 21:25:23 +02:00
lb@lb520
b5ef9b6214
Added an alternate toolkit kivy (based on SDL2) that can be used instead of tk.
...
Added scripts to build an android app.
2018-03-03 20:37:56 +02:00
Shlomi Fish
38bfb88971
Made the new flake8 and travis happier.
...
Fix the warnings.
2017-11-04 20:15:52 +02:00
Shlomi Fish
de93df2de7
flake8 and other tests.
2017-09-18 16:37:02 +03:00
Shlomi Fish
86b243ad53
flake8
2017-09-18 15:37:05 +03:00
Shlomi Fish
f40fdfbb82
Remove debug traces and fix the solver dlg.
2017-08-25 18:25:58 +03:00
Shlomi Fish
aa4f9ee5da
Crude code to get some func running in py3.
...
Right now klondike and freecell sort of work, but this is very hacky and
there are many leftover debug traces.
2017-08-25 18:25:58 +03:00
Shlomi Fish
9f8adfe4c8
Ran 2to3 on pysollib/a*.py .
2017-04-27 20:23:47 +03:00
Shlomi Fish
82a7284824
Start implementing flake8 compliance.
...
So far for the a* files.
2017-04-19 12:03:44 +03:00
Shlomi Fish
e2a6c00606
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
2012-12-07 16:32:30 +02:00
Shlomi Fish
5dc2edda91
Get rid of gettext in init.
2012-11-25 19:43:46 +02:00
Shlomi Fish
912d576813
Add more.
2012-11-25 19:19:42 +02:00
Shlomi Fish
55cc8995ae
pysoltk.
2012-11-25 19:12:33 +02:00
Shlomi Fish
bc54ae15ee
Images.
2012-11-25 19:08:12 +02:00
Shlomi Fish
7ae1fa725d
Test and convert "import help".
2012-11-25 19:01:26 +02:00
Shlomi Fish
f5e5cce827
options.
2012-11-25 18:26:31 +02:00
Shlomi Fish
61934914b1
import pysollib.pysolrandom.
...
Convert to an explicit namespace.
2012-11-25 18:21:41 +02:00
Shlomi Fish
a681ef9664
Add import actions.
2012-11-25 18:17:32 +02:00
Shlomi Fish
884a44ceb0
gamedb.
2012-11-25 18:07:40 +02:00
Shlomi Fish
0785307eb8
Test import of pysollib.util.
2012-11-25 18:00:48 +02:00
Shlomi Fish
03c83d7900
Convert to pysollib.resource.
...
This also includes a sys.path.insert(0, ...) fix (to prepend) instead of
sys.append in order to fix finding pysollib/__init.py__ in the global
path.
2012-11-25 17:55:43 +02:00