GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - likel/winning-frustration-solitaire: This simple class calculates the chance of winning Frustration Solitaire given two values, Cards (13) and Suits (4).

BranchesTags
Open more actions menu

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
docs/phpdoc
docs/phpdoc
 
 
src
src
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

winning-frustration-solitaire

This simple class calculates the chance of winning Frustration Solitaire given two values, Cards (13) and Suits (4). It's developed in PHP and uses Rook Polynomials to calculate the chance of winning.

Description (from Wikipedia)

Frustration is a simple and fast solitaire game that relies purely on luck rather than on skill, similar to but opposite of Hit or Miss. As in the latter game, the player deals the cards, and says "ace" when drawing the first card, "two" for the second, then "three, four... nine, ten, jack, queen, king" then starts again with "ace." If the rank of a dealt card matches the rank uttered by the player while dealing it, the game is lost; the game is won if the sequence is successfully repeated four times (and the entire deck is thus dealt out) without any word/card matches causing a loss.

The game has been the subject of several mathematical studies; the odds of winning are approximately 1.6%.

https://en.wikipedia.org/wiki/Frustration_(solitaire)

https://arxiv.org/pdf/math/0703900.pdf

How to run

Run example.php from the CLI, e.g. in linux:

$ php example.php {number_of_cards} {number_of_suits}

Run example.php in a web browser

About

This simple class calculates the chance of winning Frustration Solitaire given two values, Cards (13) and Suits (4).

Topics

chancefrustrationphppolynomialrooksolitairewin

Resources

Readme
MIT license
Activity

Stars

2 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.