freecell

Crates.iofreecell
lib.rsfreecell
version0.1.0
sourcesrc
created_at2019-11-26 04:59:51.634641
updated_at2019-11-26 04:59:51.634641
descriptionGame objects and rules for the solitaire card game FreeCell
homepage
repositoryhttps://github.com/Arman-Mielke/freecell-rs
max_upload_size
id184376
size118,399
Arman Mielke (Arman-Mielke)

documentation

README

FreeCell

tests unsafe forbidden License: MIT OR Apache-2.0

Game objects and rules for the solitaire card game FreeCell, written in Rust.

THIS PROJECT IS A WORK IN PROGRESS

FreeCell Rules

Source: Wikipedia

  • Construction and layout
    • One standard 52-card deck is used.
    • There are four open freecells and four open foundations.
    • Cards are dealt face-up into eight cascades, four of which comprise seven cards each and four of which comprise six cards each.
  • Building during play
    • The top card of each cascade begins a tableau.
    • Tableaux must be built down by alternating colors.
    • Foundations are built up by suit.
  • Moves
    • Any freecell card or top card of any cascade may be moved to build on a tableau, or moved to an empty cell, an empty cascade, or its foundation.
    • Complete or partial tableaus may be moved to build on existing tableaus, or moved to empty cascades, by recursively placing and removing cards through intermediate locations.
  • The game is won after all cards are moved to their foundation piles.

Not all deals are solvable, but the probability of an unsolvable deal is very low. It is estimated that 99.999% of possible deals are solvable.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

Commit count: 263

cargo fmt