GithubHelp home page GithubHelp logo

crazy-eights's Introduction

crazy-eights

Crazy Eights, with customizeable rules! See DESIGN.md for design notes.

Usage

First, install Python 3.6.8. Then, run these commands:

pip install -r requirements.txt

See the help menu using this command:

python main.py -h

To start a game with 1 player, 3 NPCs, and using rules.txt to specify rules, run:

python main.py -p 1 -n 3 -r rules.txt

Find more advanced usage guidelines below Rules.

Rules

Crazy Eights is a very simple card game, similar to Uno. Players start with 5 cards and take turns placing cards into a central pile. The card you place must satisfy one of two criteria:

  • Match the suit (Clubs, Diamonds, Hearts, Spades) of the pile's top card.
  • Match the rank (Ace to King) of the pile's top card.

If you have no playable cards, you may draw a card from the pile. If you have a playable card, you must play it. You win when you run out of cards!

There are some special cards in this game:

  • Reverse: When played, the order of play is reversed.
  • Skip: When played, the next player is skipped.
  • Crazy 8: This card may be placed on top of any card. When you play it, you can specify a suit, and the next player must obey this suit.

Advanced Usage

Customizing rules.txt

The format per line for rules.txt goes as such:

[RANK] of [SUIT]: [effect1], [effect2], [effect3]

For example,

10 of Clubs: wild, reverse, skip

would make the 10 of Clubs a wild, reverse, and skip card.

  • The ranks are: Ace, 2, 3, 4, 5, 6, 7, 8, 9, 10, Jack, Queen, King
  • The suits are: Clubs, Diamonds, Hearts, Spades

Credits

Modules used are listed in requirements.txt. Code pulled from outside sources is linked appropriately.

crazy-eights's People

Contributors

legitmaxwu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.