Shlomi Fish
05cb36a41f
Update .gitignore: add generated files or remove old.
2020-02-09 11:39:40 +02:00
Shlomi Fish
39a4978357
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.
2020-02-09 11:39:40 +02:00
Shlomi Fish
6ddacc7d27
Extract a common class/struct.
...
This is Refactoring / code cleanup.
See:
* https://en.wikipedia.org/wiki/God_object
* https://en.wikipedia.org/wiki/Extract_class
* 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-02-09 11:39:40 +02:00
Shlomi Fish
08a1a9b872
Extract a common class/struct.
...
This is Refactoring / code cleanup.
See:
* https://en.wikipedia.org/wiki/God_object
* https://en.wikipedia.org/wiki/Extract_class
* 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-02-09 11:39:40 +02:00
Shlomi Fish
493e044122
Extract a common class/struct.
...
This is Refactoring / code cleanup.
See:
* https://en.wikipedia.org/wiki/God_object
* https://en.wikipedia.org/wiki/Extract_class
* 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-02-09 11:39:39 +02:00
lb@lb7520
efff5f56ff
cardconv updated.
...
png images converted from gifs by IM resulted in an indexed png format. This
lead to Problems with tranparency, especially with ganijfa and hanafuda
cardsets. To circumvent these problems IM had to be advised to produce
32 bit mode rgba format.
affects android apk build process only.
2020-02-09 11:39:39 +02:00
lb@lb520
f73c032b41
Further corrections to python3 / android. Card images format has been changed to png. And a bugfix.
2020-02-09 11:39:39 +02:00
lb@lb520
3396bcd0ef
additional deletes in mkp4a.init to allow apk builds out of the repo
...
fix for a gradle bug (in mkp4a.common)
2020-02-09 11:39:39 +02:00
Juhani Numminen
50a4c06e1c
android: adapt to python3.
...
android: Install p4a using pip
Add 'set -e' to sh scripts, they must stop upon any error
README.md: kivy does not specifically require python2
android: Overhaul initialization scripts
android: Simplify apk build scripts by using the 'common' file
Merge the scripts cardconv and cardsetsgiftobmp
android: Fix startup script shebang to python3
android: Simplify mkkeystore and ignore the keystore file
android: Fix up debian prerequisites
The package cython (as opposed to cython3) even caused me to produce
an apk that did not start (TypeError: must be str, not bytes).
Android SDK requires java8; install and set as the default.
The build processes complained about lld and libtinfo5; added in.
mercurial (or hg) is seemingly unused.
The pip pcakges were needed by android/initsdk.py which is gone.
android: Ensure that the html files are built
2020-02-09 11:39:39 +02:00
Shlomi Fish
575b4b1923
moved functionality to pysol-cards.py
2020-02-09 11:39:39 +02:00
Shlomi Fish
72c2276f94
Fix the 'picturegallery' game.
...
See https://github.com/shlomif/PySolFC/issues/140 . Thanks to
@scottfurry for testing.
2020-02-09 11:39:39 +02:00
Juhani Numminen
989b566090
Add an error message to pysol_cards version check
2020-02-09 11:39:39 +02:00
Shlomi Fish
abdac68586
moved functionality to pysol-cards.py
2020-02-09 11:39:39 +02:00
Shlomi Fish
35d6c0e9b4
Extract a common class/struct.
...
This is Refactoring / code cleanup.
See:
* https://en.wikipedia.org/wiki/God_object
* https://en.wikipedia.org/wiki/Extract_class
* 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-02-09 11:39:39 +02:00
Shlomi Fish
3ff955be53
consolidate diffs
2020-02-09 11:39:39 +02:00
Shlomi Fish
0e692eb511
update to latest pypi ver
2020-02-09 11:39:39 +02:00
Juhani Numminen
8922e6f0ac
travis: Simplify pip install step
2020-02-09 11:39:39 +02:00
Juhani Numminen
2b3f211641
travis: Change language from python to generic
...
Travis's python virtualenv setup does not help too much in our case
because we use both python2 and python3 while travis will setup the
virtualenv for only one at a time.
2020-02-09 11:39:39 +02:00
Juhani Numminen
07f2a6409a
travis: linux: Use alternative way to install deps, apt addon is not working anymore?!
...
Strip down some dependencies:
- libperl-dev is not used.
- perl will come with cpanminus.
- make is installed in Travis' ubuntu image anyway.
- python3 will follow from the python3-* modules.
- Explicitly mention python-pip.
2020-02-09 11:39:39 +02:00
Juhani Numminen
364e0325db
travis: osx: Do not set CPPFLAGS etc, nothing will be compiled
2020-02-09 11:39:39 +02:00
Juhani Numminen
8983de5e9a
travis: Change Ubuntu 14.04 to 18.04
2020-02-09 11:39:39 +02:00
Juhani Numminen
5243810dba
repack-min-cardsets: Remove temporary directory before copying (github #135 )
...
If the directory is not removed, on the second run of the script,
duplicated subdirectories will be created, e.g.
$dest_vbase/cardset-standard/cardset-standard/
that will essentially double the unpacked size.
2020-02-09 11:39:39 +02:00
Shlomi Fish
4726d91f66
fix flake8 tests
2020-02-09 11:39:39 +02:00
Frédéric Brière
618195bb8e
Define canMoveCards() for Hanafuda sequence stacks
...
Any stack of Hanafuda cards is always deemed movable, even if it is out
of sequence. The effect can easily be seen a game such as Firecracker,
where:
- Any stack can be dragged as a whole (but not released)
- "Highlight piles" will highlight everything
- Asking for a hint will ignore most valid moves
This is due to Hanafuda_SequenceStack lacking a canMoveCards() method.
2020-02-09 11:39:39 +02:00
Juhani Numminen
09a5df8439
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
2020-02-09 11:39:39 +02:00
Juhani Numminen
e1a320c837
Improve Filesystem Hierarchy Standard compliance
...
These are actually for binaries, not data:
/usr/games "Games and educational binaries"
/usr/local/games "Local game binaries"
The directories for the data:
/usr/share/games "Static data files for /usr/games"
"The requirements for the contents of [/usr/local/share] are the same as for
/usr/share."
Quoting https://refspecs.linuxfoundation.org/FHS_3.0/fhs-3.0.html
2020-02-09 11:39:39 +02:00
Shlomi Fish
c524900e69
consolidate diffs
2020-02-09 11:39:39 +02:00
Shlomi Fish
b3f6232dd7
Extract a common class/struct.
...
This is Refactoring / code cleanup.
See:
* https://en.wikipedia.org/wiki/God_object
* https://en.wikipedia.org/wiki/Extract_class
* 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-02-09 11:39:39 +02:00
Shlomi Fish
f3d3517160
add missing attribute.
...
See https://github.com/shlomif/PySolFC/issues/129 .
2020-02-09 11:39:39 +02:00
Shlomi Fish
ad1a358672
Add missing package - 'game'.
...
See https://github.com/shlomif/PySolFC/issues/130 .
Thanks to @scottfurry .
2020-02-09 11:39:39 +02:00
Shlomi Fish
a7b8921695
minimal ver of pysol_cards.
...
See https://github.com/shlomif/PySolFC/issues/128 .
2020-02-09 11:39:39 +02:00
Shlomi Fish
b76e395892
fix travis failures.
2020-02-09 11:39:39 +02:00
Shlomi Fish
b2a9fde2f5
moved functionality to pysol-cards.py
2020-02-09 11:39:39 +02:00
Shlomi Fish
9ef244d185
Extract a function or class to step away from God Object.
...
See:
* https://en.wikipedia.org/wiki/God_object
* https://www.c-sharpcorner.com/article/god-object-a-code-smell/ .
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.
2020-02-09 11:39:39 +02:00
Shlomi Fish
4c77060c40
moved functionality to pysol-cards.py
2020-02-09 11:39:39 +02:00
Juhani Numminen
a147346b99
Makefile: On Windows, use ; as path separator instead of :
2020-02-09 11:39:39 +02:00
Juhani Numminen
4d7b636174
Remove extraneous plurals from po/de*, add msgfmt checks
2020-02-09 11:39:39 +02:00
Juhani Numminen
8658e6c618
Simplify po/pysol.pot generation
2020-02-09 11:39:39 +02:00
Juhani Numminen
1c848c8122
Split de.po into de_pysol.po and de_games.po
...
All the other languages are that way.
2020-02-09 11:39:39 +02:00
Juhani Numminen
a85f537305
Improve Makefile
...
The PYTHONPATH is now set centrally, except for the tests.
Environment for the tests is prepared using target-specific variables.
https://www.gnu.org/software/make/manual/make.html#Target_002dspecific
To ensure exiting on command failure, "set -e" is added before loops,
and otherwise ";" is replaced with "&&" between commands.
https://www.debian.org/doc/debian-policy/ch-source.html#error-trapping-in-makefiles
"mkdir -p" does not need an existence test beforehand.
Changed all python invocations to python3.
LANG and PYSOL_DEBUG were never exported so they probably had no effect.
Removed for simplicity.
2020-02-09 11:39:39 +02:00
Juhani Numminen
ab63876f31
Generate all_games.html in the data/html directory
2020-02-09 11:39:39 +02:00
Shlomi Fish
2594ebaa12
moved functionality to pysol-cards.py
2020-02-09 11:39:39 +02:00
Shlomi Fish
bc63eac8cd
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-02-09 11:39:39 +02:00
Juhani Numminen
36b568543e
Install icons to standard locations for linux desktop
...
Also reorganize icons in subdirectories indicating size.
See the Icon Theme Specification:
https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#install_icons
2020-02-09 11:39:39 +02:00
Shlomi Fish
539cb641aa
list prereqs.
...
See https://caremad.io/posts/2013/07/setup-vs-requirement/ .
2020-02-09 11:39:39 +02:00
Juhani Numminen
4768e0f3aa
Delete local copy of configobj in favor of the pypi package
...
The "validate" module does come in the same pypi package.
2020-02-09 11:39:39 +02:00
Shlomi Fish
cf84de4070
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.
2020-02-09 11:39:39 +02:00
Shlomi Fish
f69d5cb9b4
Extract a common class/struct.
...
This is Refactoring / code cleanup.
See:
* https://en.wikipedia.org/wiki/God_object
* https://en.wikipedia.org/wiki/Extract_class
* 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-02-09 11:39:39 +02:00
Shlomi Fish
6d3a0c0d4f
install the attrs.py deps.
2020-02-09 11:39:39 +02:00
Shlomi Fish
dde8e2b3df
Extract a common class/struct.
...
This is Refactoring / code cleanup.
See:
* https://en.wikipedia.org/wiki/God_object
* https://en.wikipedia.org/wiki/Extract_class
* 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-02-09 11:39:39 +02:00