dice game instructions + analysis + monte carlo simulation
TeX Haskell Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore lint Aug 6, 2014
Gemfile gem Aug 14, 2014
Guardfile regex Jan 20, 2014
Makefile lint Aug 6, 2014
Pig.hs lint Aug 6, 2014
README.md aspelllint Mar 6, 2014
analysis.pdf added makefile Dec 15, 2011
analysis.tex aspelllint Mar 6, 2014

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