node package manager

Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…

risk

Probability calculator for the board game risk

Risk

Probability of territory capture for the board game risk

npm install risk -g

$ risk [attackers] [defenders]

The number of attackers does not include the one required on the territory

var risk = require('risk');
 
risk(7, 5); // 0.7364 
risk(4, 5); // 0.3586 

MIT