Giter Site home page Giter Site logo

solitaire's Introduction

Solitaire

A simple text based Solitaire game played with keyboard input

Start game with "python main.py"

  • The following inputs are valid:
    • 1 or blank: Draws a card from the deck
    • 2: Moves card(s) from one pile to another
    • 3: Automatically moves all valid cards to the foundation piles
    • 4: Undo the last move
    • 5: Start a new game
    • 0: Quit current game
  • When moving a card the following inputs are used to specify a pile
    • 0: Draw Pile
    • 1-7: The Tableau Piles from left to right
    • H: The Foundation Piles (used when moving to foundation piles)
    • H1-H4: The Foundation Piles from left to right (used when moving from the foundation piles)

The four foundation piles always hold the same suit. From left to right they are Spade, Heart, Club, Diamond.

Inputs for a single move can be chained. Examples:

  • "2 0 1" will attempt to move a card from the draw pile to the first tableau pile.
  • "2 2 7" will attempt to move cards from the second tableau pile to the seventh.
  • "2 3 H" will attempt to move a card from the third tableau pile to the appropriate foundation pile.
  • "2 H1 1" will attempt to move a card from the first foundation pile to the first tableau pile.

solitaire's People

Contributors

csshepard avatar

Watchers

James Cloos 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.