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

416 commits

Author SHA1 Message Date
Shlomi Fish
e2c11a7ba0 fix flake8 + tidyall tests 2020-08-27 11:52:59 +03:00
Shlomi Fish
3de9955879 try2fix flake 8 tests [travis/etc.] 2020-06-17 20:53:11 +03:00
Shlomi Fish
d04601ad1c add a test for ScorpionTail_RowStack.
A similar bug was fixed in Scorpion_RowStack.
2020-06-16 10:34:05 +03:00
Shlomi Fish
730ecf775b Fix for ScorpionTail in python3.
It is hacky and there may be many similar bugs.

See https://github.com/shlomif/PySolFC/issues/164 .

It also needs tests.
2020-06-16 10:34:05 +03:00
Shlomi Fish
8e4ed1e157 Tentative fix for Scorpion Tail/etc. play.
See https://github.com/shlomif/PySolFC/issues/164

Thanks to @Arcorann. Needs tests.
2020-06-16 10:34:05 +03:00
Juhani Numminen
97c957d055 Fix whitespace in pyramid.py 2020-02-11 22:10:00 +02:00
lufebe16
81fab2028a Corrections on game 'pyramid'
- For TypeError reported with #147. (clickhandler failed to return a value)
- For index out of range (in pyramid.y)
2020-02-10 18:01:20 +01:00
Shlomi Fish
c2ec2d5195 Add 13 column Bisley - thanks to qunka.
See:

* https://github.com/shlomif/PySolFC/issues/148

* https://gist.github.com/qunka/3adac1878b481eb419ff6f3e1726add5

Thanks to https://github.com/qunka .
2020-01-07 11:38:37 +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
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
Roderik Ploszek
9bf8f475bb Fix Three Peaks scoring
Score is correctly updated after moving a card to the waste stack or
after winning a game. Double counting is prevented by the score_counted
variable.

see https://github.com/shlomif/PySolFC/issues/111
2019-04-22 09:28:18 +02:00
Shlomi Fish
d3b1674a47 Fix spider illegal moves canMove bug.
See https://sourceforge.net/p/pysolfc/bugs/36/ . TODO: add tests.
2019-02-19 19:45:51 +02:00
Shlomi Fish
91e5cdafa3 Fix the indentation.
See http://perl-begin.org/tutorials/bad-elements/#no-indentation .
2019-02-19 17:14:17 +02:00
Shlomi Fish
e4643f71e7 add support for solving three golf variants.
Using the BlackHoleSolverWrapper .

See https://github.com/shlomif/PySolFC/issues/98 issue98.
2019-01-26 19:09:31 +02: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
Shlomi Fish
c0076b5b36 Better fix for SourceForge bug #31.
See https://sourceforge.net/p/pysolfc/bugs/31/ . Thanks to Caelia Renee
Chapin for the fix and to Kevin Knerr for the report. Test case by
@shlomif.
2018-12-06 19:26:20 +02:00
Shlomi Fish
908de63d9f Fix flake8 tests.
For the new flake8.
2018-11-11 22:43:36 +02:00
Shlomi Fish
b142366595 Fix exception in the Wasp variant.
See https://sourceforge.net/p/pysolfc/bugs/31/ .

unable to move cards in py3.
2018-10-08 23:19:59 +03:00
Roderik Ploszek
38bb0393f1 Fix a typo 2018-04-15 23:34:45 +02:00
Roderik Ploszek
15befcf6cf Fix Right Triangle in Python 3
Wrong methods were called (from TalonStack instead of Stack) because of
new-style class' MRO in Python 3
2018-04-15 23:20:25 +02:00
Shlomi Fish
dd675e30b5 Add the Freecell w Zero Reserves preset.
It is useful to me, and the wizard-based games do not support the solver
well.
2018-04-15 17:51:54 +03:00
Roderik Ploszek
c37fd78310 Fix a typo 2018-04-15 15:49:40 +02:00
Roderik Ploszek
18bccf7dc7 Fix playable preview of Double Fives 2018-04-14 09:12:54 +02:00
Roderik Ploszek
3ff3dcf54e Fix integer division 2018-04-14 09:07:12 +02:00
Roderik Ploszek
3b80878788 Fix return value of dealCards
for Canfield Rush talon
2018-04-14 09:03:40 +02:00
Shlomi Fish
85eedc6186 flake8 - empty whitelist. 2018-03-21 10:45:12 +02:00
Shlomi Fish
033f99e4f2 refactoring. 2018-03-13 12:42:04 +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
Roderik Ploszek
c9baf9585a Fix integer division 2018-03-03 17:20:57 +01:00
Shlomi Fish
ca48ec221d Fix a crash in shisensho.
See https://github.com/shlomif/PySolFC/issues/54 . Thanks to @lufebe16
for the report and the fix.
2018-02-24 13:11:43 +02:00
Shlomi Fish
3ada0e3e0b Convert to six.moves. 2018-02-20 01:41:40 +02:00
Shlomi Fish
64720e8a97 Convert to six.py 2018-02-19 19:26:09 +02:00
Shlomi Fish
2c1228fc95 got flake8 to validate mahjongg1/2/3. 2018-02-19 18:51:02 +02:00
Shlomi Fish
76580b7a3f Extract a method. 2017-11-13 22:27:43 +02:00
Shlomi Fish
4ad3f0f889 Extract a base class/trait for some games. 2017-11-13 21:38:34 +02:00
Shlomi Fish
6cfd8d351e Extract more common methods. 2017-11-09 21:40:42 +02:00
Shlomi Fish
184d4e32db Extract method. 2017-11-09 21:24:35 +02:00
Shlomi Fish
4f2b28e017 Extract another method. 2017-11-09 19:20:41 +02:00
Shlomi Fish
4fc37276aa Extract _startDealNumRows(). Refactoring. 2017-11-09 19:06:59 +02:00
Shlomi Fish
aa72842042 Refactoring more into _dealNumRows. 2017-11-09 18:48:59 +02:00
Shlomi Fish
dd2f0ab0e1 Continue refactoring. 2017-11-09 18:41:41 +02:00
Shlomi Fish
1fda22efbe Start extracting _dealNumRows().
A common pattern in the code.
2017-11-09 18:07:15 +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
e0efb8a02c flake8 2017-09-18 15:57:16 +03:00
Shlomi Fish
b887d6042b Made flake8 happier.
Removed __all__ and stuff - we use explicit imports now.
2017-09-18 13:04:53 +03:00
Shlomi Fish
dbdd0f392c division sanity 2017-08-25 18:25:58 +03:00
Shlomi Fish
e90b48104d Division sanitize. 2017-08-25 18:25:58 +03:00
Shlomi Fish
5ac5039687 Convert the Layout_Method to staticmethod()
This way it can be called as before in both python2 and python3.
2017-08-25 18:25:58 +03:00