Skip to content
dice game instructions + analysis + monte carlo simulation http://en.wikipedia.org/wiki/Pig_%28dice%29
TeX Haskell Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
Gemfile gem
Guardfile regex
Makefile
Pig.hs
README.md aspelllint
analysis.pdf
analysis.tex aspelllint

README.md

pig - dice game instructions + analysis + monte carlo simulation

HOMEPAGE

Wikipedia: Pig

CONTENTS

  • analysis.pdf - Statistical analysis
  • pig.hs - Monte Carlo simulation in Haskell

EXAMPLE

$ git clone https://github.com/mcandre/pig.git
$ cd pig
$ cabal install random-fu
$ make
./pig
Running 10000 games...
Totaling wins...

Roll Six       32%
Roll Five      28%
Roll K Times   27%
100 or Bust    8%
Roll Bad K     3%
Always Hold    0%
Always Roll    0%
Roll Once      0%

REQUIREMENTS

Optional

Install Guard and aspelllint:

$ bundle

DEVELOPMENT

Lint

Keep the code tidy with HLint:

$ cabal install hlint
$ make lint

Spell Check

$ aspelllint
...

Local CI

Start Guard in a shell, and it will automatically run unit tests when the source code changes:

$ guard
...
Something went wrong with that request. Please try again.