Shlomi Fish
7bbacfb97e
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-08-14 20:49:03 +03:00
Shlomi Fish
0ffcc12afc
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.
2019-08-14 19:42:24 +03:00
Shlomi Fish
9b0b862406
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.
2019-08-14 18:25:34 +03:00
Shlomi Fish
23843dc2a8
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.
2019-08-14 17:59:27 +03:00
lb@lb7520
18febbe240
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.
2019-08-13 10:00:49 +02:00
lb@lb520
5b75c1b413
Further corrections to python3 / android. Card images format has been changed to png. And a bugfix.
2019-08-12 09:50:38 +02:00
lb@lb520
81da718007
additional deletes in mkp4a.init to allow apk builds out of the repo
...
fix for a gradle bug (in mkp4a.common)
2019-08-09 11:16:31 +02:00
Juhani Numminen
fdebf13171
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
2019-08-08 19:12:44 +03:00
Shlomi Fish
15365f6267
moved functionality to pysol-cards.py
2019-08-08 18:44:49 +03:00
Shlomi Fish
c71c2fa07a
Fix the 'picturegallery' game.
...
See https://github.com/shlomif/PySolFC/issues/140 . Thanks to
@scottfurry for testing.
2019-08-07 12:28:29 +03:00
Juhani Numminen
836eb54008
Add an error message to pysol_cards version check
2019-08-06 20:07:30 +03:00
Shlomi Fish
fd5bf10ddd
moved functionality to pysol-cards.py
2019-08-04 18:47:19 +03:00
Shlomi Fish
0082962a93
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.
2019-07-31 16:10:28 +03:00
Shlomi Fish
4d61d73f3a
consolidate diffs
2019-07-30 12:37:22 +03:00
Shlomi Fish
6b228291cc
update to latest pypi ver
2019-07-30 12:36:31 +03:00
Juhani Numminen
52348a4daa
travis: Simplify pip install step
2019-07-28 22:28:56 +03:00
Juhani Numminen
d1e1e436a1
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.
2019-07-28 22:28:56 +03:00
Juhani Numminen
76882c9dd1
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.
2019-07-28 22:28:56 +03:00
Juhani Numminen
e80c3637dd
travis: osx: Do not set CPPFLAGS etc, nothing will be compiled
2019-07-28 22:28:56 +03:00
Juhani Numminen
edf3470dfe
travis: Change Ubuntu 14.04 to 18.04
2019-07-28 22:28:56 +03:00
Juhani Numminen
dbe4a96ac9
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.
2019-07-28 19:06:36 +03:00
Shlomi Fish
bc93657311
fix flake8 tests
2019-07-28 10:19:56 +03:00
Frédéric Brière
0abb801203
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.
2019-07-28 10:15:38 +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
Juhani Numminen
1137dbb39b
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
2019-07-28 10:05:05 +03:00
Shlomi Fish
70e1159947
consolidate diffs
2019-07-28 08:35:40 +03:00
Shlomi Fish
3c93a19508
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.
2019-07-26 16:21:07 +03:00
Shlomi Fish
602f9ebc93
add missing attribute.
...
See https://github.com/shlomif/PySolFC/issues/129 .
2019-07-26 00:04:07 +03:00
Shlomi Fish
b785d35e0b
Add missing package - 'game'.
...
See https://github.com/shlomif/PySolFC/issues/130 .
Thanks to @scottfurry .
2019-07-25 23:27:49 +03:00
Shlomi Fish
fb4f801ecc
minimal ver of pysol_cards.
...
See https://github.com/shlomif/PySolFC/issues/128 .
2019-07-25 20:04:36 +03:00
Shlomi Fish
4929787315
fix travis failures.
2019-07-24 11:56:39 +03:00
Shlomi Fish
e1d461b78d
moved functionality to pysol-cards.py
2019-07-24 02:35:54 +03:00
Shlomi Fish
6dd98f5984
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.
2019-07-22 14:31:56 +03:00
Shlomi Fish
198038b1c9
moved functionality to pysol-cards.py
2019-07-21 11:27:58 +03:00
Juhani Numminen
52eeb40942
Makefile: On Windows, use ; as path separator instead of :
2019-07-19 01:38:40 +03:00
Juhani Numminen
acbf11de31
Remove extraneous plurals from po/de*, add msgfmt checks
2019-07-19 01:38:40 +03:00
Juhani Numminen
45f8c312a4
Simplify po/pysol.pot generation
2019-07-19 01:38:40 +03:00
Juhani Numminen
81432ef353
Split de.po into de_pysol.po and de_games.po
...
All the other languages are that way.
2019-07-19 01:38:39 +03:00
Juhani Numminen
1b89ae2346
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.
2019-07-19 01:38:39 +03:00
Juhani Numminen
0b5698dff0
Generate all_games.html in the data/html directory
2019-07-19 01:38:39 +03:00
Shlomi Fish
dba230b40a
moved functionality to pysol-cards.py
2019-07-18 21:35:45 +03:00
Shlomi Fish
6d4a1191cc
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-07-18 14:43:58 +03:00
Juhani Numminen
c9de855dd8
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
2019-07-18 11:09:08 +03:00
Shlomi Fish
9a51c55402
list prereqs.
...
See https://caremad.io/posts/2013/07/setup-vs-requirement/ .
2019-07-16 21:03:51 +03:00
Juhani Numminen
3e873a3fde
Delete local copy of configobj in favor of the pypi package
...
The "validate" module does come in the same pypi package.
2019-07-16 12:57:24 +03:00
Shlomi Fish
7934babad2
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-07-15 17:17:04 +03:00
Shlomi Fish
62005c7c42
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.
2019-07-15 14:17:03 +03:00
Shlomi Fish
c30d131181
install the attrs.py deps.
2019-07-15 12:52:19 +03:00
Shlomi Fish
18efc0e5d3
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.
2019-07-14 22:56:06 +03:00
Juhani Numminen
63c6aa5816
Don't duplicate locales, e.g. de -> de_DE
...
The duplication seems to be unnecessary. Setting environment variable
LANG=it_CH gives Italian as PySolFC language, even if we didn't explicitly
create 'it_CH'.
2019-07-14 14:02:43 +03:00