Skip to content

tkuriyama/risk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Risk

Link

Link to visualization.

Solver

The original solver, written in Haskell (resides in the haskell directory).

The solver was then ported to Elm with minimal modifications, so it runs on the fly when the visualization is loaded (omitting the need for data loading and parsing...).

At the time of writing, there didn't seem to be a rational numbers library compatible with Elm 0.19.1. So the Elm source includes a hand-written Rational.elm library, built on elm-bigint 2.0.1.

Visualization

The Elm code compiles an interactive(ish) SVG visualization.

To (re)compile the visualization, run elm make src/Main.elm --optimize --output=elm.js from the elm directory.

To run tests using elm-test, run elm-test from the elm directory. Parts of the project were also reviewed using elm-coverage.

TCR

This project was partly developed using the "Test && Commit || Revert" workflow (see some notes on TCR here, hence the tcr directory and associated scripts.

About

Game of Risk: probabilities and visualization

Resources

Stars

Watchers

Forks