Skip to content

edj-boston/monty-hall-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monty Hall JS Build Status Coverage Status Dependency Status devDependency Status

A Monty Hall problem simulator with 100% test coverage.

Install

npm install monty-hall

Example

var MontyHall = require('monty-hall');

var m = new MontyHall(10000);

console.log(m.results);

{
  switches         : 5006,
  switchWins       : 3304,
  stays            : 4994,
  stayWins         : 1687,
  switchWinPercent : 66,
  stayWinPercent   : 34
}

About

A Monty Hall problem simulator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published