An open API service indexing awesome lists of open source software.

https://github.com/sambecker/rustwar

Simulation designed to determine the average length (with and without shuffling) of a game of war
https://github.com/sambecker/rustwar

Last synced: about 1 month ago
JSON representation

Simulation designed to determine the average length (with and without shuffling) of a game of war

Awesome Lists containing this project

README

          

# War

How long does it take for a game of war to end?

### Run simulation
`cargo run`

### Test simulation
`cargo test`

### Simulation output
```
STARTING SIMULATION (MAX GAME LENGTH: 10000 TURNS)
Games: 100000 [SHUFFLED ] 233.32 (Indeterminate games: 0.00%)
Games: 100000 [SHUFFLED ] 232.75 (Indeterminate games: 0.00%)
Games: 100000 [UNSHUFFLED] 565.19 (Indeterminate games: 8.15%)
Games: 100000 [UNSHUFFLED] 563.28 (Indeterminate games: 8.10%)
SIMULATION FINISHED (47 SECONDS)
```

### Simulation preview
![Console animation](simulation-preview-update.gif)