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

1026 commits

Author SHA1 Message Date
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
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
a7b8921695 minimal ver of pysol_cards.
See https://github.com/shlomif/PySolFC/issues/128 .
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
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
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
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
Shlomi Fish
9dd1eeb15e remove pointless comments 2020-02-09 11:39:38 +02:00
Shlomi Fish
b306d78c47 extract a method. 2020-02-09 11:39:38 +02:00
Shlomi Fish
f64875c418 fix pysol --deal 1/24/1000.
Low ms deals without the ms prefix caused an error.
2020-02-09 11:39:38 +02:00
Shlomi Fish
ae16134dce Extract ms_rearrange . 2020-02-09 11:39:38 +02:00
Shlomi Fish
dc1d061103 speedup.
See https://github.com/shlomif/PySolFC/issues/119 .
2020-02-09 11:39:38 +02:00
Shlomi Fish
5a6dcba2fd 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:38 +02:00
Shlomi Fish
b03e877b3b refactoring 2020-02-09 11:39:38 +02:00
Shlomi Fish
648f3d6bb9 refactoring 2020-02-09 11:39:38 +02:00
Shlomi Fish
bcaa95660b 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:38 +02:00
Shlomi Fish
78c7e333c4 add a to implement method. 2019-05-31 19:33:02 +03:00
Shlomi Fish
ec808f30e9 implement writeCard. 2019-05-31 19:33:02 +03:00
Shlomi Fish
a15dfe4773 start writing writeCard(). 2019-05-31 19:33:02 +03:00
Shlomi Fish
fc926bb993 refactor. 2019-05-31 19:33:02 +03:00
Shlomi Fish
bbf038300b extract method. 2019-05-31 19:33:02 +03:00
Shlomi Fish
494a52a04b rename 2019-05-31 19:33:02 +03:00
Shlomi Fish
aa1907a567 add the write tags methods. 2019-05-31 19:33:02 +03:00
Shlomi Fish
7a12c8b21f add writeEmptyTag. 2019-05-31 19:33:02 +03:00
Shlomi Fish
44413c9f0b start writing the kpat emitter. 2019-05-31 19:33:02 +03:00
Shlomi Fish
c12be2eaed optimization 2019-05-31 19:28:27 +03:00
Shlomi Fish
b6da50d20f 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-05-31 19:23:27 +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
2bec58be2d Fix next deal / Ctrl+N for ms deals. 2019-05-23 19:10:57 +03:00
Shlomi Fish
74441a1746 Convert functionality to pysol-cards mod. 2019-05-23 17:26:27 +03:00