Skip to content

A simulation of a risk battles given equal army sizes, no retreating, and basic risk rules.

License

Notifications You must be signed in to change notification settings

swhetzel/risk_game_simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README file for risk game simulation

This repo simulates battles in the board game Risk between armies of equal size in order to determine how often the attacking or defending side wins based on the starting army size. There are two simulations in the repo, an object oriented set of modules and a functional module, both of which attempt to simulate the above conditions.

usage: run pete's main.py

Files Stephen (Functional)

  1. risk_game_simulation.py
    • main file for stephen's version of the risk simulator

Result plot in stephen's style

Files Pete (Object Oriented)

  1. main.py - the main function for pete's version of the risk simulator
  2. army.py - the class definition for the armies in pete's code
  3. data.txt - a sample output from pete's code
  4. plotter.py - a quick and dirty script to make the plot in the same style as original
  5. petes-plot.png - petes version of the plot

About

A simulation of a risk battles given equal army sizes, no retreating, and basic risk rules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages