Skip to main content

A library for modeling and playing the card game Gin Rummy

Project description

PyLGRum - A Python Library for Gin Rummy

Overview

PyLGRum aims to be a comprehensive Python language library for the card game Gin Rummy.

It currently includes:

  • Classes that model the cards and collections of cards needed to play the game.
  • Classes that model a game and the players in that game, supporting two operating modes:
    • A synchronous mode driven by a Game object that calls hooks in Player objects to advance the game
    • An asynchronous mode appropriate for play through an API

Motivation & Project Goals

Gin Rummy is a fine game and all, but I hope you have better things to do with your time than play a two-person card game against a computer opponent.

So why PyLGRum?

As somebody who both enjoys playing Gin Rummy and making things with software, I wanted a platform in which I could experiment at scale with different strategies for game play. Basically, I want a way to define and test different Gin Rummy playing algorithms. It also serves as a playground project for different programming and system design techniques.

Current Status

PyLGRum is substantially complete and working, with the following open issues:

  • The challenging player always starts the game
  • Game doesn't recognize end of game state yet
  • Test coverage on TUI game/player is incomplete

Technical Documentation

The PyLGRum package is thoroughly documented here.

TODOs

at some point:
- replace print statements in game play with non-terminal-assuming messages

maybe improvements:
- more pythonic in deck.py (lists)
- Card's *_val() methods ---> properties instead
- CardStack size(), peek() --> properties

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pylgrum-0.0.1.tar.gz (24.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylgrum-0.0.1-py3-none-any.whl (33.4 kB view details)

Uploaded Python 3

File details

Details for the file pylgrum-0.0.1.tar.gz.

File metadata

  • Download URL: pylgrum-0.0.1.tar.gz
  • Upload date:
  • Size: 24.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.3

File hashes

Hashes for pylgrum-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d22abe4a66fee5647c6a34e55ae116997e6288eed4f6f4c9d5324db6f11d94ea
MD5 3615310825c3ee81af2f1a335eaa8afa
BLAKE2b-256 3ad88c5ec4674b8076923ef5d399454e7790a6814450cd6de9ef758f256e42d8

See more details on using hashes here.

File details

Details for the file pylgrum-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pylgrum-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 33.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.3

File hashes

Hashes for pylgrum-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 55787ab25ca644006c0abf72d51cf9e02a56757760ac83f74092173c306eaeb2
MD5 0180801019e8256f446a35bfa1ccf8cd
BLAKE2b-256 34e55b0d71d09ad8693e76b888f3b0da69259108bd701e0ab765c9cef47cc259

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page