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
Gemfile
Guardfile
Makefile
Pig.hs
README.md
analysis.pdf
analysis.tex

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