Skip to content

msuozzo/risk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

risk

Given an initial number of attacking armies and a sequence of defending armies, generates the distribution of attacking armies that will make it to the final territory.

Essentially, this tool is designed for the situation in the game of risk in which an attacking player wants to know how many pieces they can expect to end up with after a series of attacks. This can be useful in weighing two different attacking options or simply in better understanding the odds of an attack.

Calling form:
path_distribution.py {number of attacking armies} {number of defending armies...}

Example:

  • Attacking with 10 armies

  • Want to attack a sequence of 3 territories with 1, 2, and 3 armies respectfully

    The proper call would be:

  python path_distribution.py 10 1 2 3

About

Given an initial number of attacking armies and a sequence of defending armies, generates the distribution of attacking armies that will make it to the final territory.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages