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

1457 commits

Author SHA1 Message Date
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
24ccdf634b macOS: use "PySolFC Help" menuitem provided by tk
The details are explained in this tutorial
https://tkdocs.com/tutorial/menus.html

For this to work, init() must destroy the tkinter.Tk instance it creates
so that was uncommented.
2020-10-14 14:59:38 +03:00
Juhani Numminen
7255ad9e68 macOS: Update travis to python 3.9 2020-10-12 23:35:15 +03:00
Juhani Numminen
451700aefa macOS: Create PySolFC.dmg for convenient installation 2020-10-12 23:35:15 +03:00
Juhani Numminen
97e981d900 macOS: ensure the application window is shown
py2app's "argv_emulation" feature prevents the Tkinter window from being shown
when PySolFC.app is launched.

This did not affect launching pysol.py using Terminal on macOS.

Solution found here: https://stackoverflow.com/questions/12992316/tkinter-py2app-created-application-doesnt-show-window-on-initial-launch
2020-10-12 23:35:15 +03:00
Juhani Numminen
d3faa78e75 Prune pysollib.macosx; it no longer had any effect 2020-10-12 23:35:15 +03:00
Juhani Numminen
07aac001b7 Clarify where a COPYRIGHT file should exist 2020-10-11 16:47:16 +03:00
Juhani Numminen
278b3261d9 Optimize cardsetparser
Apply the EAFP principle:
Regex matching was just doing extra the work because int() will check that
its argument is suitable in any case.

EAFP as in https://stackoverflow.com/questions/11360858/what-is-the-eafp-principle-in-python
2020-10-11 16:27:43 +03:00
Juhani Numminen
755b1d51d3 Remove file that shouldn't be there 2020-10-11 14:38:27 +03:00
Shlomi Fish
cb0ddeeccd use https:// link instead of mailto:
The mailto: link is available there
2020-10-11 13:27:05 +03:00
Shlomi Fish
dda2f3b520 revise some confusing phrasing 2020-10-11 13:23:14 +03:00
Shlomi Fish
d145642a9b Rename variables to make them more descriptive.
We used "lines_list" instead of "line" in singular. "list" is
the ADT ( https://en.wikipedia.org/wiki/Abstract_data_type )
rather than its python class.
2020-10-11 13:02:01 +03:00
Juhani Numminen
12601364dc Invoke init_tile() only when tile is used 2020-10-10 21:23:35 +03:00
Juhani Numminen
0be465dea1 Add error message for a missing card back (#185) 2020-10-10 21:22:58 +03:00
Neelix57
0f15613a15 fix cardset tutorial 2020-10-10 21:22:07 +03:00
Neelix57
1b14baf856 modify cardset tutorial 2020-10-10 21:21:52 +03:00
Juhani Numminen
da5b85c064 contrib/install-pysolfc.sh: pip install pygame for sound output (#180) 2020-10-08 15:10:22 +03:00
Juhani Numminen
a8a262a68c AppVeyor fix: change py2exe to pyinstaller
py2exe seems abandoned and still requires python < 3.4
while attrs does not support such an old python version anymore.

* https://ci.appveyor.com/project/shlomif/pysolfc/builds/35127928

To accommodate pyinstaller's directory layout, dist was changed to
dist/pysol in scripts/create_iss.py.

scripts/build.bat had become unmaintained and outdated.
2020-10-08 15:04:36 +03:00
Shlomi Fish
95a0d7d007 refactor/modernize the calls to open()
use "with", flags
2020-10-06 18:43:15 +03:00
Juhani Numminen
bf9ce90a5b Refactor cardset config.txt parser to a new module 2020-10-06 14:35:28 +03:00
Shlomi Fish
dfff276fc1 Rework the cardset tutorial formatting and grammar.
I hereby disclaim any implicit or explicit ownership of my changes in this
changeset, and put them under a multiple licence consisting of your choice of
one of more of:

- The CC0 / Public Domain - https://creativecommons.org/choose/zero/ .

- The MIT / Expat license - https://en.wikipedia.org/wiki/MIT_License

- The default licence of your project

Crediting me will be nice, but not mandatory, and you can change the licence
of the project without needing my permission.
2020-10-05 10:14:24 +03:00
Neelix57
55088a81bb add cardset tutorial 2020-10-04 20:46:09 +02:00
Neelix57
f35d7fb9f4 improvements
pysol_po_improvement
2020-09-30 10:59:26 +03:00
Shlomi Fish
e1d62726c5 Fix tidyall tests.
See:

https://metacpan.org/release/Code-TidyAll .
2020-09-30 10:48:47 +03:00
Shlomi Fish
05d78d5490 travis fix #1: flake8 formatting 2020-09-26 18:52:15 +03:00
Neelix57
eff7beacee Add files via upload 2020-09-26 12:18:14 +03:00
Neelix57
4be8f02a4e Add files via upload 2020-09-26 12:18:14 +03:00
Neelix57
f1baad5347 gen-html.py translation 2020-09-26 12:18:14 +03:00
Shlomi Fish
9708704b87 Remove trailing whitespace.
See:

* http://www.shlomifish.org/lecture/C-and-CPP/bad-elements/#trailing-whitespace

* http://vim.wikia.com/wiki/Highlight_unwanted_spaces
2020-09-20 16:02:26 +03:00
Neelix57
58d43d12fb upload rules 2020-09-20 15:55:00 +03:00
Neelix57
6fb107547a upload rules 2020-09-20 15:55:00 +03:00
Neelix57
bbb4c6c0f1 improvements 2020-09-20 10:49:05 +02:00
Shlomi Fish
3f84e44121 Add French help translation ( by Eric / Neelix57 )
Thanks, Eric!

Translation of the help pages / manual.
2020-09-10 13:03:08 +03:00
Shlomi Fish
622d881a34 Add French translation ( by Eric / Neelix57 )
Thanks, Eric!
2020-09-07 17:20:38 +03:00
Shlomi Fish
ee282b6219 document how to submit changesets 2020-09-07 11:21:16 +03:00
Shlomi Fish
39d59547af flake8 compliance 2020-09-07 11:20:53 +03:00
Shlomi Fish
b24da7cc92 Gracefully handle pypi pysol_cards dependency
See:
https://sourceforge.net/p/pysolfc/discussion/503708/thread/208461caee/

Thanks to Fred.
2020-08-27 12:04:42 +03:00
Shlomi Fish
e2c11a7ba0 fix flake8 + tidyall tests 2020-08-27 11:52:59 +03:00
Shlomi Fish
e9e19afc46 Use freecell-solver wo which fc-solve.
No need for the executable if freecell_solver.py exists and
can be instantiated.
2020-06-24 16:59:40 +03:00
Shlomi Fish
bb8785e76b prepare for the new release 2020-06-22 13:28:22 +03:00
Shlomi Fish
38def5a0e7 optimize by using .recycle() 2020-06-20 13:45:48 +03:00
Shlomi Fish
18a460a1e7 implement black_hole_solver lib. 2020-06-19 16:19:12 +03:00
Shlomi Fish
7eb29a216f refactoring: del some unhelpful comments 2020-06-18 12:45:38 +03:00
Shlomi Fish
b518678d8d extract a method which delegates 2020-06-18 12:07:35 +03:00
Shlomi Fish
41c2633fcd update the solver iter and states counts. 2020-06-18 11:55:41 +03:00
Shlomi Fish
3de9955879 try2fix flake 8 tests [travis/etc.] 2020-06-17 20:53:11 +03:00
Shlomi Fish
db348ee91b trap import error better [fix] 2020-06-17 20:15:39 +03:00
Shlomi Fish
fcc55dfe56 refactoring: avoid underused vars 2020-06-17 20:11:54 +03:00
Shlomi Fish
697f15c9df convert to .format() 2020-06-17 14:22:39 +03:00
Shlomi Fish
d9efba4456 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.
2020-06-17 13:48:48 +03:00