A comprehensive, feature-rich, open source, and portable, collection of Solitaire games.

Overview

StretchView

PySol Fan Club edition

This is an open source and portable (Windows, Linux and Mac OS X) collection of Card Solitaire/Patience games written in Python. Its homepage is http://pysolfc.sourceforge.net/ .

The maintenance branch of PySol FC on GitHub by Shlomi Fish and by some other people, has gained official status, ported the code to Python 3, and implemented some other enhancements.

  • Build Status AppVeyor Build status

Screenshots

Image

Requirements.

Installation.

We provide an installer for Windows (requires Windows XP SP3 or higher) as well as an Android package on F-droid.

For installation from source, see: http://www.python.org/doc/current/inst/

Running from source without installation.

You can run from the source directory:

python pysol.py

After following steps similar to these (on Mageia Linux ):

Step 1 - install the dependencies

On Fedora you can do:

sudo dnf builddep PySolFC

On Mageia you can do:

sudo urpmi git make pygtk2 pygtk2.0-libglade gnome-python-canvas tkinter

On Debian / Ubuntu / etc. you can do:

sudo apt-get install cpanminus make perl python3-setuptools python3-tk

Step 2 - build PySol.

You can try running:

python3 scripts/linux-install.py
git clone https://github.com/shlomif/PySolFC.git
cd PySolFC
# Now make sure you have installed the dependencies.
gmake test
gmake rules
ln -s data/images images
tar -xvf PySolFC-Cardsets-2.0.tar.bz2 # Needs to be downloaded from sourceforge
mkdir -p ~/.PySolFC
rmdir ~/.PySolFC/cardsets
ln -s "`pwd`/PySolFC-Cardsets-2.0" ~/.PySolFC/cardsets
python pysol.py

Note! If you are using a Debian derivative (e.g: Debian, Ubuntu, or Linu Mint) and you are getting an error of "No cardsets were found !!! Main data directory is [insert dir here] Please check your PySol installation.", then you likely installed the cardsets package which has removed some files that are needed by pysol from source (without the debian modifications).

Please uninstall that package and use the cardsets archive from sourceforge.net per the instructions above.

Installing from source and running in a python venv (virtual environment)

At the moment, this only works on POSIX (Linux, FreeBSD and similar) systems. Windows and Mac users - you'll need to chip in with a script for your system.

1 - Install build prerequisites: six, random2 and pysol-cards

This is kind of stupid and maybe it can be fixed in the future, but for now:

pip install six
pip install random2
pip install pysol-cards

You may want to use your OS distribution package system instead, for example:

sudo apt-get install python-six
sudo apt-get install python-random2

For Pillow compilation, libjpeg headers and libraries need to be available:

sudo apt-get install libjpeg-dev

2 - Clone the source from version control

git clone git://github.com/shlomif/PySolFC.git
cd PySolFC

3 - Create your virtual environment.

PKGTREE=/usr/local/packages/PySolFC # or whatever
export PKGTREE
mkdir -p "$PKGTREE"
( cd "$PKGTREE" && python -m venv ./env )

4 - Run the install script

./contrib/install-pysolfc.sh

5 - Put cardsets into place as above.

6 - Enjoy playing

"$PKGTREE"/env/bin/pysol.py

Alternate toolkit.

  • Kivy (10.0 or later)

  • Features:

    • Sound support integrated.
    • Android apk build support.
  • Running from source without installation:

python pysol.py --kivy

Configuring Freecell Solver

If you want to use the solver, you should configure freecell-solver ( http://fc-solve.shlomifish.org/ ) by passing the following options to its CMake-based build-system: -DMAX_NUM_FREECELLS=8 -DMAX_NUM_STACKS=20 -DMAX_NUM_INITIAL_CARDS_IN_A_STACK=60.

Install Extras.

Related repositories and links

Related:

Other open source solitaires:

  • solitaire.gg - web-based and written in Scala
  • Solitairey - web-based written in JavaScript
  • KPat - desktop-based for KDE.
  • Aisleriot - desktop-based by the GNOME project with relatively limited functionality.

Screencasts:

Chat

To facilitate coordination about contributing to PySol, please join us for a real time Internet chat on the ##pysol chat room on Freenode (note the double octothorpe/hash-sign/pound-sign) . We may set up chat rooms on different services in the future.

In addition, we set up a Google Group for discussing open source card games which will also be used for discussing PySol. Feel free to subscribe or post!

Comments
  • [idea] Publish a flatpak on Flathub

    [idea] Publish a flatpak on Flathub

    Flatpak is a distribution-agnostic package system where the application is shipped with all the dependencies and runs inside some kind of sandbox. It's relatively new, and is gaining quite a lot of popularity.

    Additionally, Valve's Steam Deck supports Flathub out-of-the-box. In fact, its main OS is mounted read-only, so people must either use flatpak or manually install it themselves in their home directory. The easiest way to run anything on Steam Deck is through Flathub. (Well, the easiest is actually through Steam store itself.)

    opened by denilsonsa 62
  • Windows 10 some options windows hang

    Windows 10 some options windows hang

    Installed game from official Windows installer, hangs when trying to select cardsets. Sorry, haven't found where logs are to attach. If I close this blank window, game window also closes.

    Снимок экрана 2021-10-02 223745

    opened by Nebula-Mechanica 33
  • Convert the code to Python 3

    Convert the code to Python 3

    As Python 2.x is going away, we need to convert the code to use Python 3 instead. A prerequisite for that is to merge duplicate or mostly duplicate code that uses the APIs that were removed in Python 3.

    opened by shlomif 29
  • General discussion thread

    General discussion thread

    Update: Discussions are better held on the Google Group .

    I've got a question. Should we wait with bug reporting and feature requests until the Python 3 port will be ready? Or maybe we should create new tickets now to facilitate the creation of a roadmap/development plan for the future and discussion? It's obvious that the implementation of some features can take a very long time and that some stuff is low-priority.

    Apart from our own ideas, I suggest looking at the biggest solitaire packages on the market, i.e. Pretty Good Solitaire, SolSuite, and BVS Solitaire Collection (even in a virtual machine), as well as at some open source solitaire apps to see if we find something interesting.

    opened by jan-kleks 27
  • Prepare an MS Windows Binary Installer

    Prepare an MS Windows Binary Installer

    We wish to prepare a functional Windows binary installer that will install cpython (preferably 3.x) and then the pysol sources and provide a usable way to run it for non-technical people. Some leads:

    • This /r/Python thread - https://www.reddit.com/r/Python/comments/8237i3/help_is_needed_in_preparing_a_windows_binary/

    • The artifacts produced by appveyor - see https://ci.appveyor.com/project/shlomif/PySolFC . They don't seem to be usable in a windows 7 x86-64 virtualbox VM.

    Help wanted 
    opened by shlomif 22
  • Hanafuda decks can be slow to load

    Hanafuda decks can be slow to load

    Could use another opinion or some extra testing on this if anyone's available.

    As part of my effort to improve the look and feel of PySolFC, I've created a higher resolution Hanafuda cardset based on some Creative Commons images I found online. Very nice looking cardset - problem is it takes a very long time to load. I think it has something to do with the fact that Hanafuda cardsets require a large number of unique card bottoms - load times got worse when I added those in. Unfortunately, performance issues are not really my specialty and it could just be the computer I'm testing on. I tried using a second computer, which has much higher specs than the first. It loads at a reasonable speed there, but there's still some noticeable lag. Could use a few more tests to determine how much of an issue this could be.

    I think the slowness is coming from the use of Pillow's paste method, though replacing this could be a rather major refactor. If the extra bottoms are involved, adding some universal Hanafuda suit icons to replace the cardset specific bottoms might be another option, but I'd have to find some.

    Here is the cardset in question - I plan to PR this to the cardset repo once I feel a little better about the functionality:

    cardset-louie-mantia-hanafuda.zip

    Note that some of the Hanafuda games do currently have layout issues with this cardset. I'm aware of these and working on fixing those.

    opened by joeraz 18
  • No moves possible in Scorpion Tail

    No moves possible in Scorpion Tail

    Tried to play Scorpion Tail, and I can't seem to make any moves. Not even the demo can make any moves. The only thing I can do is deal out the stock, but then after that I still can't make any moves.

    This is on version 2.8.0 on Windows 10.

    opened by Arcorann 16
  • New name and promotion

    New name and promotion

    When you finish porting PySolFC to Python 3 and you add SVG support (to make PySolFC resolution-independent), you can definitely think about a name change. My suggestion is: PySol+ (BTW, PySolFC was a strange name in the first place).

    That would be the right time to think about promotion too:

    -- create a very simple website using: https://pages.github.com/ Including info on your efforts as well as on PySol's history and legacy.

    -- tell people that PySol is still alive in the form of PySol+ using reddit, Hacker News, Slashdot, and GamingOnLinux (these website are frequented by those who are "in the know", they gonna tell the others about the project). A lot of users are really nostalgic about PySol, but they simply don't know that your repo exists. It took me some time to find it as well.

    -- create a Patreon account (nice example: https://www.patreon.com/Nekotekina) to earn some cash because why not?

    enhancement 
    opened by jan-kleks 16
  • v2.6.0 - Launch error

    v2.6.0 - Launch error

    Issue:

    PySol Fan Club edition v2.6.0 crashes at startup.

    Log:

    Traceback (most recent call last):
      File "pysol.py", line 36, in <module>
      File "C:\projects\pysolfc\pysollib\main.py", line 30, in <module>
      File "C:\projects\pysolfc\pysollib\app.py", line 32, in <module>
      File "C:\projects\pysolfc\pysollib\images.py", line 28, in <module>
      File "C:\projects\pysolfc\pysollib\pysoltk.py", line 45, in <module>
      File "C:\projects\pysolfc\pysollib\tile\toolbar.py", line 29, in <module>
      File "C:\projects\pysolfc\pysollib\ui\tktile\menubar.py", line 7, in <module>
      File "C:\projects\pysolfc\pysollib\hint.py", line 36, in <module>
      File "C:\projects\pysolfc\pysollib\util.py", line 26, in <module>
    ImportError: No module named 'site'
    

    (Win8.1Pro,x64)

    opened by THEtomaso 14
  • Remove random2 dependency

    Remove random2 dependency

    Dear pysolfc developers,

    I'm a Debian Developer working on the pysolfc package. Yesterday I have looked into packaging the latest version of pysolfc and stumbled across the fact that random2 is not packaged into Debian. Unfortunately python-random2 is most likely not going to be packaged into Debian since it's not actively maintained, and its usefulness is very unclear.

    What's exactly the reason why you needed to replace the random builtin ?

    Thanks for your work.

    opened by hlef 14
  • Mint / Publish a new stable 2.2 Release - what needs to be done beforehand?

    Mint / Publish a new stable 2.2 Release - what needs to be done beforehand?

    I want to publish a new stable release, in part because from my experience people do not adequately test the prereleases and because we now have a usable windows package (thanks @Programator2 !).

    So what needs to be done?

    We need a usable release announcement in reddit-compatible markdown - @jan-kleks - can you help?

    Are there any show stopping bugs?

    I suppose the Android / Kivy port does not have to block it and we can keep it py2-only for now - @lufebe16 - what do you think?

    Anything else?

    opened by shlomif 14
  • Solitaires with Russian deck

    Solitaires with Russian deck

    Russian deck is a regular card deck but without cards from 2 to 5 (thus consisting of 36 cards instead of 52). Is it possible for you to implement solitaires analogical to these with 52 cards?

    For example, "Russian" Yukon would use 6 rows of cards instead of 7 and 4 open cards in each row (except the first) instead of 5. Klondike-like solitaires would use 6 rows instead of 7 as well.

    opened by schw0reismus 3
  • would like to have more versions of mau mau and other additions

    would like to have more versions of mau mau and other additions

    https://github.com/TokisApps/tokisapps.github.io/blob/main/20221011180532.pdf

    the document is in german by the way i cannot code it that well with such quality

    so YOU MUST DO IT

    thanks in advance

    opened by TokisApps 1
  • Pysol 2.18 android no file/storage permissions.

    Pysol 2.18 android no file/storage permissions.

    Pysol 2.18 on Android 11 has permission only for photo and media, not file/storage. This prevents saving games, settings, options, etc. This is not the case on 2.8.

    android/mobile 
    opened by DanKrabach 2
  • Pysolfc import function

    Pysolfc import function

    For the pysolfc penguin game, when you export a game and then import the exported game, the results are wrong. I think the import function is broken for the penguin game. It appears that export is correct. I cannot import a user generated game either. Thanks, Don.

    opened by donnsd 3
  • Touch controls don't work under Steam Deck game mode

    Touch controls don't work under Steam Deck game mode

    How to reproduce:

    1. Get a Steam Deck (that's the expensive part).
    2. Switch to Desktop Mode (which is just KDE/Plasma).
    3. Use Discover to install PySolFC from Flathub.
    4. Launch PySolFC. Observe how everything works fine in Desktop Mode. Both the mouse input (emulated via the trackpad) and the touch screen input can be used to play the game and interact with the menus.
    5. Add PySolFC as a non-steam game to Steam.
    6. Return to Game Mode.
    7. Go to your Library (under the Game Mode), then find PySolFC from your non-steam games section.
    8. Configure the controller input to emulate a web browser. That's the one that maps mouse to the right trackpad.
    9. Launch PySolFC under the Game Mode on Steam Deck.
    10. BUG!
      • The mouse input works fine.
      • The touch screen input doesn't work at all.

    I don't know what makes PySolFC special (maybe the TK library?), because other tools or games like Warble, LBreakoutHD, Google Chrome, VLC (all installed from Flathub) work fine under the Game Mode (although the pop-up menus can get buggy, but that's a different issue) and they all can be controlled with both (emulated) mouse and the touch screen. But somehow PySolFC doesn't accept touch controls.

    Steam OS Game Mode uses gamescope as the compositor; while the desktop mode uses the standard KDE/KWin/Plasma environment. I don't know if they use X11 or Wayland or both.

    It might be possible to reproduce this bug using gamescope under other Linux distros, but you probably need a touch screen anyway. Or possibly by running some version of Steam OS under a virtual machine with emulated touch screen. I don't know, I haven't tried those options.

    opened by denilsonsa 0
  • [Feature Request] Add mahjong (not solitaire), domino, Chinese domino, etc.

    [Feature Request] Add mahjong (not solitaire), domino, Chinese domino, etc.

    There are still more games available. Here are what I have gathered (together with board games): https://polyglotclub.com/wiki/Language/Multiple-languages/Culture/Tabletop-Games

    opened by GrimPixel 1
Releases(pysolfc-2.18.0)
Owner
Shlomi Fish
I'm an Israeli software developer, writer and humorist. You can learn more about me from the pages of my home site (link below).
Shlomi Fish
A small script to help me solve Wordle because I'm that lazy

Wordle Solver A small script to help me solve Wordle because I'm that lazy. Warning: I didn't write this to be efficient nor elegant at all, so you'll

K4YT3X 3 Feb 11, 2022
OpenGL experiments with Pygame & ModernGL

pygame-opengl OpenGL experiments with Pygame & ModernGL TODO Skybox & Reflections Post-process effects (motion blur, color correction, etc..) Normal m

Kadir Aksoy 4 Oct 28, 2022
Ultimaze est un jeu en 2.5D, réalisé dans le cadre d'un projet de NSI.

Ultimaze Ultimaze est un jeu en 2.5D, réalisé dans le cadre d'un projet de NSI. La consigne était d'utiliser la librairie pygame pour créer un jeu en

parlabarbedeMerlin 3 Sep 17, 2022
3 Oct 22, 2021
Basic Python physics library.

pythonPhysics Basic Python physics library. Must have pygame installed. How to: Sketon program is included. for p in env.particles: pygame.draw.circle

1 Jan 16, 2022
MCTS (among other things) for 2048

2048 Created by Chad Palmer for CPSC 474, Fall 2021 Overview: This is an application which can play 2048 and simulate games of 2048 with a variety of

Chad Palmer 1 Dec 16, 2021
Python Program: Hilo Game

Python Program: Hilo Game 🂡 Description Hilo is a game in which the player gues

2 Jan 22, 2022
Tic-Tac-Toe - Tic-Tac-Toe game build With Python

Tic Tac Toe This game is very popular amongst all of us and even fun to build as

PyLaboratory 0 Feb 06, 2022
🌍🍓 A better MCPi Launcher

Planet Launcher A better, maintained launcher for the Minecraft: Pi Edition Reborn mod. Report Bug | Request Feature Planet is a maintained, feature-r

15 Oct 19, 2022
Este repositorio es creado con el fin de brindar soporte a las personas que están en el proceso de aprendizaje MISIONTIC 2022 en la universidad de Antioquia

Este repositorio es creado con el fin de brindar soporte a las personas que están en el proceso de aprendizaje MISIONTIC 2022 en la universidad de Antioquia. Hecho por los estudiantes para los estudi

Andrés Mauricio Gómez 11 Jun 22, 2022
We tried to recreate this classic game using python physics libraries.

We tried to recreate this classic game using python physics libraries. The result is certainly hilarious but enjoyable. One of my very first physics application.

Delwys Glokpor 2 Dec 12, 2021
a game of life implementation in python

gameoflife-py python implementation of game of life Installing As long as you have bash and curl installed and are on Linux the install script should

Raghav 5 Jun 09, 2021
Input-based tic tac toe game made in only python.

Tic Tac Toe Tic Tac Toe is a game in which two players seek in alternate turns to complete a row, a column, or a diagonal with either three O's or thr

Ayza 5 Jun 26, 2022
Mandaw 2 Mar 01, 2022
Deep Running

Deep Running 1. Install $ pip install --user deep_running 2. Lap N Lap. Name Remarks Citation Meta 1 Mario Deeeeeep Running I was born to run. dannyso

karaage 69 Jan 31, 2022
Practice the use of the random library to get the user guess the result.

Guessing Game Practice the use of the random library to get the user guess the result. Additional description about the project and its features. Buil

Herbert Orellana 1 Dec 13, 2021
Playing memory game is fun and the more harder it is the more challenging it is.

Playing memory game is fun and the more harder it is the more challenging it is. Playing thi sgame make us stress free and also happy. So, I have decided to make a memory Game which people can play w

Shreejan Dolai 3 Nov 11, 2022
The Turtle Race Game built in Python with Turtle module.

Turtle Race Game The Turtle Race Game built in Python with Turtle module. Installation If you don't have Turtle module on your computer. You can downl

Aytaç Kaşoğlu 1 Nov 09, 2021
An asynchronous Minecraft server wrapper written in python3 with asyncio

mark3 (WIP) A modern Minecraft server wrapper written in python3 with asyncio TODO Note: The order of the following checklist doesn't necessarily mean

Colin Andress 7 Jul 29, 2022
A python-based multi-player online educational game for students to play in a class or club setting.

Kurono (codename: aimmo) Code for Life has been developed by Ocado Technology as a free, open-source project to inspire the next generation of compute

Ocado Technology 108 Nov 07, 2022