Skip to main content

Cribbage for your command line

Project description

# Cribbage for your command line

Implementation of [cribbage](https://www.pagat.com/adders/crib6.html) for two players. Text-based GUI for use on your command line (so you can appear to be working). Several kinds of opponents.

## AI Opponents

  • Random: plays a random legal move

  • Enumerative: enumerative (brute force) strategy

  • Trained: trained by playing 100,000 games

## Installation

Install using pip:

`bash pip install cribbage `

Or install from the source

`bash git clone git@github.com:dacarlin/cribbage.git cd cribbage python setup.py install `

## How to use

If you want to play an easy game, you can run with

`bash cribbage human random --name1 Alex --name2 Amy `

If you would like to try playing the AI (you likely will not win), you can run with

`bash cribbage human enumerative --name1 Alex --name2 Amy `

In either, replace “Alex” with your name and “Amy” for the name you wish to call the opponent, or omit them if you don’t care about naming the players. Run cribbage -h for more.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

cribbage-0.1.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file cribbage-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cribbage-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a8e61f95a40f74cab4e4ed35ae5dfb7baa31ddcd2be55475d53f9796e833e4a
MD5 376bd0afc9bf09db9b8f31b36fc5e572
BLAKE2b-256 710b4e42e2ce2c91551143fe1591677b76da313fb1c76586d68058705157a111

See more details on using hashes here.

Supported by

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