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
Setup minecraft server (Tuinity) to your directory

hapeshiva server-setup Setup minecraft server (Tuinity) for you. Support for optimization Create optimized yml Customazible server port and view dista

3 May 11, 2022
Cricket game using PYQT

Cricket-game-using-PYQT This is a Fantasy cricket Desktop application build in p

Sanket Mane 1 Jan 03, 2022
Python Program: Hilo Game

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

2 Jan 22, 2022
Adventure-Game - Adventure Game which is created using Python

Adventure Game 🌇 This is a Adventure Game which is created using Python. Featur

ArinjoyTheDev 1 Mar 19, 2022
This is a python interactive story game that I made to show off what I've learnt in python coding for a month

Purpose The files in this repository are for that of a story game created with python version 3.8.5 The purpose of this project was to get familiar wi

0 Dec 30, 2021
AI Mario challenges you to clear all stage of Super Mario game.

mario-ai-challenge Challenge AI Mario to clear all stages of Super Mario. GitHub Pages Site Rules Enjoy building AI Mario. Share information. Use Goog

karaage 48 Dec 10, 2022
A programme which basically has the same function as the actual Rock paper scissors game.

A programme which basically has the same function as the actual Rock paper scissors game.

1 Feb 11, 2022
Cocos2d-x is a suite of open-source, cross-platform, game-development tools used by millions of developers all over the world.

cocos2d-x Win32 Others cocos2d-x is a multi-platform framework for building 2d games, interactive books, demos and other graphical applications. It is

cocos2d 16.7k Jan 04, 2023
It just a cli based snake game written in Python.

Snake Game in Python Things that I learned in this project: OOP in Python. Clean code. The curses library. How to run the game You need to clone this

Kevin Marques 7 Oct 01, 2022
The Classic Fruit Collecting game made in python with pygame

FruitCollect A classic fruit Collecting game made with pygame Install pygame before running: "pip install pygame" Rules: Random fruits will drop from

Pranav Bobby 1 Dec 01, 2021
PyCharge is an open-source computational electrodynamics Python simulator

PyCharge PyCharge is an open-source computational electrodynamics Python simulator that can calculate the electromagnetic fields and potentials genera

Matthew Filipovich 28 Jan 03, 2023
:tada: 2048 in your terminal

term2048 term2048 is a terminal-based version of 2048. Install pip install term2048 To upgrade a previous installation, use: pip install -U term2048

Baptiste Fontaine 798 Nov 21, 2022
Stock game is a python program that simulates real-life stock marketing, saving, and investments

Stock game is a python program that simulates real-life stock marketing, saving, and investments. Users get to trade and manage their portfolio and manage their 100,000 dollar portfolio.

Sai Praneth Raju K. 1 Jul 14, 2022
Hex-brawl-v25 - Simple Brawl Stars v25.107 server emulator written in Python

Hex Brawl Simple Brawl Stars v25.107 server emulator written in Python. Requirem

Shark01 3 Nov 24, 2022
This is a simple rock paper scissor game created with python.

This is a simple rock paper scissor game created with python.

Fayas Noushad 3 Feb 04, 2022
Flappy Bird Game using Pygame in Python

Flappy Bird Game using Pygame in Python Demo Pages Hello dear, hope you are very well! I created Flappy Bird Game using Pygame ( Pygame is a cross-pla

Datt Panchal 3 Feb 05, 2022
Synthesizer based on Conway's Game of Life

Conway Synth Synthesizer based on Conway's Game of Life Trying to avoid step sequencer fashions that have been done before and basing it on actual cel

Giacomo Loparco 4 Mar 15, 2022
A Pygame game made in 48 hours

Flappuccino Flappuccino is a game created in 48 hours for the PyGame Community New Years Jam using Python with Pygame. Screenshots Background Informat

PolyMars 242 Jan 02, 2023
To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.

To solve games using AI, we will introduce the concept of a game tree followed by minimax algorithm.

Vaibhaw 7 Oct 13, 2022
Jiminy, fast and portable Python/C++ simulator of poly-articulated systems with OpenAI Gym interface for reinforcement learning.

Jiminy is a fast and portable cross-platform open-source simulator for poly-articulated systems. It was built with two ideas in mind: provide a fast y

Alexis DUBURCQ 122 Dec 29, 2022